<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>ThemeShaper Forums Topic: List of body class selectors for os/browsers?</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Thu, 20 Jun 2013 11:52:23 +0000</pubDate>

<item>
<title>wlanni on "List of body class selectors for os/browsers?"</title>
<link>http://themeshaper.com/forums/topic/list-of-body-class-selectors-for-osbrowsers#post-22797</link>
<pubDate>Mon, 22 Aug 2011 10:34:05 +0000</pubDate>
<dc:creator>wlanni</dc:creator>
<guid isPermaLink="false">22797@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Great. I'm curious, anyone know how Android, iPad and windows phone appear? Would the preg_math look for /Android/, /iPad/, /Windows/?
&#60;/p&#62;</description>
</item>
<item>
<title>Devin on "List of body class selectors for os/browsers?"</title>
<link>http://themeshaper.com/forums/topic/list-of-body-class-selectors-for-osbrowsers#post-14051</link>
<pubDate>Wed, 21 Jul 2010 20:50:18 +0000</pubDate>
<dc:creator>Devin</dc:creator>
<guid isPermaLink="false">14051@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Thanks Gene.  I'll try it out.  Didn't realize I could try that trick with &#34;UserAgent&#34;- should be helpful as well.
&#60;/p&#62;</description>
</item>
<item>
<title>em hr on "List of body class selectors for os/browsers?"</title>
<link>http://themeshaper.com/forums/topic/list-of-body-class-selectors-for-osbrowsers#post-14020</link>
<pubDate>Tue, 20 Jul 2010 19:46:12 +0000</pubDate>
<dc:creator>em hr</dc:creator>
<guid isPermaLink="false">14020@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi Devin,&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function mobile_body_class($classes) {

	$browser = $_SERVER[ &#38;#39;HTTP_USER_AGENT&#38;#39; ];

	if ( preg_match( &#38;quot;/iPhone/&#38;quot;, $browser ) ){
		$classes[] = &#38;#39;mobile-safari&#38;#39;;
		}
	return $classes;
}

add_filter(&#38;#39;body_class&#38;#39;,&#38;#39;mobile_body_class&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This should work as a function for a child-theme. I ran a quick test using the Develop&#38;gt;UserAgent switcher in Safari to spoof the browser.&#60;/p&#62;
&#60;p&#62;I like the mobile-safari class better since this preg_match seems to return true for iPod Touches as well.&#60;/p&#62;
&#60;p&#62;-Gene
&#60;/p&#62;</description>
</item>
<item>
<title>Devin on "List of body class selectors for os/browsers?"</title>
<link>http://themeshaper.com/forums/topic/list-of-body-class-selectors-for-osbrowsers#post-14018</link>
<pubDate>Tue, 20 Jul 2010 17:51:14 +0000</pubDate>
<dc:creator>Devin</dc:creator>
<guid isPermaLink="false">14018@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I was trying to add an iPhone body class but couldn't seem to get it to work.  Has anyone done this?  I was just working directly on Thematic to start:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;} elseif ( preg_match( &#38;quot;/iPhone/&#38;quot;, $browser ) ){
		$c[] = &#38;#39;iphone&#38;#39;;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>em hr on "List of body class selectors for os/browsers?"</title>
<link>http://themeshaper.com/forums/topic/list-of-body-class-selectors-for-osbrowsers#post-10209</link>
<pubDate>Fri, 26 Feb 2010 03:02:20 +0000</pubDate>
<dc:creator>em hr</dc:creator>
<guid isPermaLink="false">10209@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi marcopolo,&#60;/p&#62;
&#60;p&#62;Look here for the &#60;code&#62;thematic_body_class&#60;/code&#62; function that creates the classes:&#60;/p&#62;
&#60;p&#62;thematic&#38;gt;library&#38;gt;extensions&#38;gt;dynamic-classes.php&#60;/p&#62;
&#60;p&#62;about two hundred lines down the page you'll see the browser detection &#38;#38; class insertion block of code. Look for the comment&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;// A little Browser detection shall we?&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62; All of the &#60;code&#62;$c[] = &#38;#39;&#38;#39;;&#60;/code&#62; represent classes that will potentially be added to the array. Therein lies your answer.&#60;/p&#62;
&#60;p&#62;-Gene
&#60;/p&#62;</description>
</item>
<item>
<title>marcopolo on "List of body class selectors for os/browsers?"</title>
<link>http://themeshaper.com/forums/topic/list-of-body-class-selectors-for-osbrowsers#post-10207</link>
<pubDate>Fri, 26 Feb 2010 02:09:45 +0000</pubDate>
<dc:creator>marcopolo</dc:creator>
<guid isPermaLink="false">10207@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hey, I've been dipping into this forum for the past couple months for answers on all things Thematic. So far it's been very helpful, thanks.&#60;/p&#62;
&#60;p&#62;Now I'm at the stage of ironing out cross-browser quirks (e.g., submit button rendering in IE6 ... Aaargh!) and I want to make sure I'm using the proper selectors. The is the list of dynamic body class selectors I've culled from dynamic-classes.php. Let me know if it's complete and correct, thanks.&#60;/p&#62;
&#60;p&#62;.mac&#60;br /&#62;
.windows&#60;br /&#62;
.linux&#60;/p&#62;
&#60;p&#62;.chrome&#60;br /&#62;
.safari&#60;br /&#62;
.opera&#60;br /&#62;
.msie&#60;br /&#62;
.ie6&#60;br /&#62;
.ie7&#60;br /&#62;
.ie8&#60;br /&#62;
.firefox
&#60;/p&#62;</description>
</item>

</channel>
</rss>
