From 9e30ccd80306e79b680a2249fb2ce634fb7bb6c0 Mon Sep 17 00:00:00 2001 From: westi Date: Wed, 10 Nov 2010 22:07:07 +0000 Subject: [PATCH] Add support for ID style classes in get_body_class(). Fixes #12397 props filosofo git-svn-id: http://svn.automattic.com/wordpress/trunk@16283 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-template.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 2dd4a94dd8..6f1a24bbd2 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -443,18 +443,22 @@ function get_body_class( $class = '' ) { $author = $wp_query->get_queried_object(); $classes[] = 'author'; $classes[] = 'author-' . sanitize_html_class( $author->user_nicename , $author->ID ); + $classes[] = 'author-' . $author->ID; } elseif ( is_category() ) { $cat = $wp_query->get_queried_object(); $classes[] = 'category'; $classes[] = 'category-' . sanitize_html_class( $cat->slug, $cat->term_id ); + $classes[] = 'category-' . $cat->term_id; } elseif ( is_tag() ) { $tags = $wp_query->get_queried_object(); $classes[] = 'tag'; $classes[] = 'tag-' . sanitize_html_class( $tags->slug, $tags->term_id ); + $classes[] = 'tag-' . $tags->term_id; } elseif ( is_tax() ) { $term = $wp_query->get_queried_object(); $classes[] = 'tax-' . sanitize_html_class( $term->taxonomy ); $classes[] = 'term-' . sanitize_html_class( $term->slug, $term->term_id ); + $classes[] = 'term-' . $term->term_id; } } elseif ( is_page() ) { $classes[] = 'page';