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:
parent
637fa4f1af
commit
48f63d061d
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue