Make WordPress Core

Changeset 25471


Ignore:
Timestamp:
09/17/2013 08:49:20 AM (11 years ago)
Author:
SergeyBiryukov
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-template.php

    r25194 r25471  
    459459        if ( is_post_type_archive() ) {
    460460            $classes[] = 'post-type-archive';
    461             $classes[] = 'post-type-archive-' . sanitize_html_class( get_query_var( 'post_type' ) );
     461            foreach ( (array) get_query_var( 'post_type' ) as $post_type )
     462                $classes[] = 'post-type-archive-' . sanitize_html_class( $post_type );
    462463        } else if ( is_author() ) {
    463464            $author = $wp_query->get_queried_object();
Note: See TracChangeset for help on using the changeset viewer.