Expect a possible array of post types in get_body_class(). props norcross. fixes #25341.
git-svn-id: https://develop.svn.wordpress.org/trunk@25471 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8a46168489
commit
48be5948d5
|
@ -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