Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Warning: Cannot modify header information - headers already sent by (output started at /home/themes/public_html/forums/bb-includes/db-mysql.php:12) in /home/themes/public_html/forums/my-templates/kakumei-variant/rss2.php on line 1
ThemeShaper Forums Topic: Dynamic Body Classes http://forums.themeshaper.com/ Help In Shaping WordPress Themes en Mon, 25 May 2015 01:19:31 +0000 wlanni on "Dynamic Body Classes" http://forums.themeshaper.com/topic/dynamic-body-classes#post-24196 Thu, 08 Dec 2011 06:53:27 +0000 wlanni 24196@http://forums.themeshaper.com/ <p>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?</p> <pre><code>//add mobile browsers function mobile_body_class($classes) { $browser = $_SERVER[ &#39;HTTP_USER_AGENT&#39; ]; if ( preg_match( &quot;/iPhone/&quot;, $browser ) ){ $classes[] = &#39;mobile-safari mobile&#39;; } elseif ( preg_match( &quot;/Android/&quot;, $browser ) ) { $classes[] = &#39;mobile-android mobile&#39;; } elseif ( preg_match( &quot;/iemobile/&quot;, $browser) ) { $classes[] = &#39;mobile-ie mobile&#39;; } return $classes; } add_filter(&#39;thematic_body_class&#39;,&#39;mobile_body_class&#39;);</code></pre> Chris on "Dynamic Body Classes" http://forums.themeshaper.com/topic/dynamic-body-classes#post-22837 Thu, 25 Aug 2011 15:00:02 +0000 Chris 22837@http://forums.themeshaper.com/ <p>Will be included in a couple of days. Added some new stuff that needs some documentation.</p> <p>Chris </p> wlanni on "Dynamic Body Classes" http://forums.themeshaper.com/topic/dynamic-body-classes#post-22771 Fri, 19 Aug 2011 22:47:39 +0000 wlanni 22771@http://forums.themeshaper.com/ <p>Hey Driftwood, would you set this to resolved if it is resolved? </p> wlanni on "Dynamic Body Classes" http://forums.themeshaper.com/topic/dynamic-body-classes#post-22770 Fri, 19 Aug 2011 22:35:40 +0000 wlanni 22770@http://forums.themeshaper.com/ <p>Whoops!</p> <pre><code>//add IE9, IE10 to body class function add_ie_browser_class_names($classes) { // add &#39;class-name&#39; to the $classes array // $classes[] = &#39;class-name&#39;; $browser = $_SERVER[ &#39;HTTP_USER_AGENT&#39; ]; if ( preg_match( &quot;/MSIE/&quot;, $browser ) ) { //$classes[] = &#39;msie&#39;; if ( preg_match( &quot;/MSIE 9.0/&quot;, $browser) ) { $classes[] = &#39;ie9&#39;; } elseif ( preg_match( &quot;/MSIE 10.0/&quot;, $browser) ) { $classes[] = &#39;ie10&#39;; } } // return the $classes array return $classes; } add_filter(&#39;thematic_body_class&#39;, &#39;add_ie_browser_class_names&#39;);</code></pre> wlanni on "Dynamic Body Classes" http://forums.themeshaper.com/topic/dynamic-body-classes#post-22769 Fri, 19 Aug 2011 22:35:15 +0000 wlanni 22769@http://forums.themeshaper.com/ <p>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 "Version HAHAHATAKETHATWLANNI!!!"</p> <pre><code>//add IE9, IE10 to body class function add_ie_browser_class_names($classes) { // add &#39;class-name&#39; to the $classes array // $classes[] = &#39;class-name&#39;; $browser = $_SERVER[ &#39;HTTP_USER_AGENT&#39; ]; // Checks browsers in this order: Chrome, Safari, Opera, MSIE, FF if ( preg_match( &quot;/MSIE/&quot;, $browser ) ) { //$classes[] = &#39;msie&#39;; if ( preg_match( &quot;/MSIE 9.0/&quot;, $browser) ) { $classes[] = &#39;ie9&#39;; } elseif ( preg_match( &quot;/MSIE 10.0/&quot;, $browser) ) { $classes[] = &#39;ie10&#39;; } } // return the $classes array return $classes; } add_filter(&#39;thematic_body_class&#39;, &#39;add_ie_browser_class_names&#39;);</code></pre> wlanni on "Dynamic Body Classes" http://forums.themeshaper.com/topic/dynamic-body-classes#post-22768 Fri, 19 Aug 2011 22:18:36 +0000 wlanni 22768@http://forums.themeshaper.com/ <p>Just a note: IE9 (and probably 10) aren't defined yet.</p> <p>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. </p> driftwood on "Dynamic Body Classes" http://forums.themeshaper.com/topic/dynamic-body-classes#post-22767 Fri, 19 Aug 2011 21:07:07 +0000 driftwood 22767@http://forums.themeshaper.com/ <p>all good in lala land. </p> driftwood on "Dynamic Body Classes" http://forums.themeshaper.com/topic/dynamic-body-classes#post-22766 Fri, 19 Aug 2011 21:02:54 +0000 driftwood 22766@http://forums.themeshaper.com/ <p>epic awesomeness, THANK YOU!!! </p> lastraw on "Dynamic Body Classes" http://forums.themeshaper.com/topic/dynamic-body-classes#post-22765 Fri, 19 Aug 2011 19:35:28 +0000 lastraw 22765@http://forums.themeshaper.com/ <p>put this in your function.php file</p> <p>define('THEMATIC_COMPATIBLE_BODY_CLASS', true);<br /> define('THEMATIC_COMPATIBLE_POST_CLASS', true); </p> driftwood on "Dynamic Body Classes" http://forums.themeshaper.com/topic/dynamic-body-classes#post-22762 Fri, 19 Aug 2011 17:36:43 +0000 driftwood 22762@http://forums.themeshaper.com/ <p>How do I initiate Thematics Dynamic Body Classes or is that automatically set to run? </p>