<?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: Dynamic Body Classes</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Tue, 21 May 2013 17:51:31 +0000</pubDate>

<item>
<title>wlanni on "Dynamic Body Classes"</title>
<link>http://themeshaper.com/forums/topic/dynamic-body-classes#post-24196</link>
<pubDate>Thu, 08 Dec 2011 06:53:27 +0000</pubDate>
<dc:creator>wlanni</dc:creator>
<guid isPermaLink="false">24196@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;As an update, here's some mobile body classes. I'm not 100% the iemobile one works yet, if anyone has a windows phone 7, can you test?&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//add mobile browsers
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 mobile&#38;#39;;
	} elseif ( preg_match( &#38;quot;/Android/&#38;quot;, $browser ) ) {
		$classes[] = &#38;#39;mobile-android mobile&#38;#39;;
	} elseif ( preg_match( &#38;quot;/iemobile/&#38;quot;, $browser) ) {
		$classes[] = &#38;#39;mobile-ie mobile&#38;#39;;
	}
	return $classes;
}
add_filter(&#38;#39;thematic_body_class&#38;#39;,&#38;#39;mobile_body_class&#38;#39;);&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>Chris on "Dynamic Body Classes"</title>
<link>http://themeshaper.com/forums/topic/dynamic-body-classes#post-22837</link>
<pubDate>Thu, 25 Aug 2011 15:00:02 +0000</pubDate>
<dc:creator>Chris</dc:creator>
<guid isPermaLink="false">22837@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Will be included in a couple of days. Added some new stuff that needs some documentation.&#60;/p&#62;
&#60;p&#62;Chris
&#60;/p&#62;</description>
</item>
<item>
<title>wlanni on "Dynamic Body Classes"</title>
<link>http://themeshaper.com/forums/topic/dynamic-body-classes#post-22771</link>
<pubDate>Fri, 19 Aug 2011 22:47:39 +0000</pubDate>
<dc:creator>wlanni</dc:creator>
<guid isPermaLink="false">22771@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hey Driftwood, would you set this to resolved if it is resolved?
&#60;/p&#62;</description>
</item>
<item>
<title>wlanni on "Dynamic Body Classes"</title>
<link>http://themeshaper.com/forums/topic/dynamic-body-classes#post-22770</link>
<pubDate>Fri, 19 Aug 2011 22:35:40 +0000</pubDate>
<dc:creator>wlanni</dc:creator>
<guid isPermaLink="false">22770@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Whoops!&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//add IE9, IE10 to body class
function add_ie_browser_class_names($classes) {
	// add &#38;#39;class-name&#38;#39; to the $classes array
	// $classes[] = &#38;#39;class-name&#38;#39;;
	$browser = $_SERVER[ &#38;#39;HTTP_USER_AGENT&#38;#39; ];

	if ( preg_match( &#38;quot;/MSIE/&#38;quot;, $browser ) ) {
		//$classes[] = &#38;#39;msie&#38;#39;;

		if ( preg_match( &#38;quot;/MSIE 9.0/&#38;quot;, $browser) ) {
			$classes[] = &#38;#39;ie9&#38;#39;;
		} elseif ( preg_match( &#38;quot;/MSIE 10.0/&#38;quot;, $browser) ) {
			$classes[] = &#38;#39;ie10&#38;#39;;
		}
	}
	// return the $classes array
	return $classes;
}
add_filter(&#38;#39;thematic_body_class&#38;#39;, &#38;#39;add_ie_browser_class_names&#38;#39;);&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>wlanni on "Dynamic Body Classes"</title>
<link>http://themeshaper.com/forums/topic/dynamic-body-classes#post-22769</link>
<pubDate>Fri, 19 Aug 2011 22:35:15 +0000</pubDate>
<dc:creator>wlanni</dc:creator>
<guid isPermaLink="false">22769@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Add this to your childtheme functions. I'm making a HUGE assumption that IE 10 is going to show up with its version as I listed below. Who knows, maybe they'll call it &#34;Version HAHAHATAKETHATWLANNI!!!&#34;&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;//add IE9, IE10 to body class
function add_ie_browser_class_names($classes) {
	// add &#38;#39;class-name&#38;#39; to the $classes array
	// $classes[] = &#38;#39;class-name&#38;#39;;
	$browser = $_SERVER[ &#38;#39;HTTP_USER_AGENT&#38;#39; ];

	// Checks browsers in this order: Chrome, Safari, Opera, MSIE, FF
	if ( preg_match( &#38;quot;/MSIE/&#38;quot;, $browser ) ) {
		//$classes[] = &#38;#39;msie&#38;#39;;

		if ( preg_match( &#38;quot;/MSIE 9.0/&#38;quot;, $browser) ) {
			$classes[] = &#38;#39;ie9&#38;#39;;
		} elseif ( preg_match( &#38;quot;/MSIE 10.0/&#38;quot;, $browser) ) {
			$classes[] = &#38;#39;ie10&#38;#39;;
		}
	}
	// return the $classes array
	return $classes;
}
add_filter(&#38;#39;thematic_body_class&#38;#39;, &#38;#39;add_ie_browser_class_names&#38;#39;);&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>wlanni on "Dynamic Body Classes"</title>
<link>http://themeshaper.com/forums/topic/dynamic-body-classes#post-22768</link>
<pubDate>Fri, 19 Aug 2011 22:18:36 +0000</pubDate>
<dc:creator>wlanni</dc:creator>
<guid isPermaLink="false">22768@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Just a note: IE9 (and probably 10) aren't defined yet.&#60;/p&#62;
&#60;p&#62;The function to redefine is browser_class_names($classes). I'm working on filtering that right now, will post back code here in a little bit.
&#60;/p&#62;</description>
</item>
<item>
<title>driftwood on "Dynamic Body Classes"</title>
<link>http://themeshaper.com/forums/topic/dynamic-body-classes#post-22767</link>
<pubDate>Fri, 19 Aug 2011 21:07:07 +0000</pubDate>
<dc:creator>driftwood</dc:creator>
<guid isPermaLink="false">22767@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;all good in lala land.
&#60;/p&#62;</description>
</item>
<item>
<title>driftwood on "Dynamic Body Classes"</title>
<link>http://themeshaper.com/forums/topic/dynamic-body-classes#post-22766</link>
<pubDate>Fri, 19 Aug 2011 21:02:54 +0000</pubDate>
<dc:creator>driftwood</dc:creator>
<guid isPermaLink="false">22766@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;epic awesomeness, THANK YOU!!!
&#60;/p&#62;</description>
</item>
<item>
<title>lastraw on "Dynamic Body Classes"</title>
<link>http://themeshaper.com/forums/topic/dynamic-body-classes#post-22765</link>
<pubDate>Fri, 19 Aug 2011 19:35:28 +0000</pubDate>
<dc:creator>lastraw</dc:creator>
<guid isPermaLink="false">22765@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;put this in your function.php file&#60;/p&#62;
&#60;p&#62;define('THEMATIC_COMPATIBLE_BODY_CLASS', true);&#60;br /&#62;
define('THEMATIC_COMPATIBLE_POST_CLASS', true);
&#60;/p&#62;</description>
</item>
<item>
<title>driftwood on "Dynamic Body Classes"</title>
<link>http://themeshaper.com/forums/topic/dynamic-body-classes#post-22762</link>
<pubDate>Fri, 19 Aug 2011 17:36:43 +0000</pubDate>
<dc:creator>driftwood</dc:creator>
<guid isPermaLink="false">22762@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;How do I initiate Thematics Dynamic Body Classes or is that automatically set to run?
&#60;/p&#62;</description>
</item>

</channel>
</rss>
