Expect a possible array of post types in get_body_class(). props norcross. fixes #25341.

Built from https://develop.svn.wordpress.org/trunk@25471


git-svn-id: http://core.svn.wordpress.org/trunk@25392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-09-17 08:50:09 +00:00
parent 637fa4f1af
commit 48f63d061d
1 changed files with 2 additions and 1 deletions

View File

@ -458,7 +458,8 @@ function get_body_class( $class = '' ) {
} elseif ( is_archive() ) {
if ( is_post_type_archive() ) {
$classes[] = 'post-type-archive';
$classes[] = 'post-type-archive-' . sanitize_html_class( get_query_var( 'post_type' ) );
foreach ( (array) get_query_var( 'post_type' ) as $post_type )
$classes[] = 'post-type-archive-' . sanitize_html_class( $post_type );
} else if ( is_author() ) {
$author = $wp_query->get_queried_object();
$classes[] = 'author';