From 48be5948d53c87fbf53524ed0e3dcf9911051b0b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 17 Sep 2013 08:49:20 +0000 Subject: [PATCH] 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 --- src/wp-includes/post-template.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index b811174de9..3caeb29eb2 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -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';