roots_body_class() is no longer necessary for body_class()

This commit is contained in:
Ben Word
2012-05-17 20:15:42 -06:00
parent 34200f1af1
commit fc7fca1d6e
2 changed files with 1 additions and 25 deletions

View File

@@ -20,7 +20,7 @@
</head>
<body <?php body_class(roots_body_class()); ?>>
<body <?php body_class(); ?>>
<!--[if lt IE 7]><p class="chromeframe">Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->

View File

@@ -621,30 +621,6 @@ function roots_body_class_filter($classes) {
}
add_filter('body_class', 'roots_body_class_filter');
function roots_body_class() {
$term = get_queried_object();
if (is_single()) {
$cat = get_the_category();
}
if (is_front_page()) {
return; // Avoid duplicate 'home' class when using static front page
}
if(!empty($cat)) {
return $cat[0]->slug;
} elseif (isset($term->slug)) {
return $term->slug;
} elseif (isset($term->page_name)) {
return $term->page_name;
} elseif (isset($term->post_name)) {
return $term->post_name;
} else {
return;
}
}
// first and last classes for widgets
// http://wordpress.org/support/topic/how-to-first-and-last-css-classes-for-sidebar-widgets
function roots_widget_first_last_classes($params) {