Make WordPress Core


Ignore:
Timestamp:
09/10/2013 03:01:10 AM (13 years ago)
Author:
wonderboymusic
Message:

Move checks for post_type being an array inline. See [25291], [25292], #18614.

File:
1 edited

Legend:

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

    r25310 r25312  
    8181 */
    8282function get_post_type_archive_template() {
    83         $obj = get_post_type_object( get_query_var( 'post_type' ) );
     83        $post_type = get_query_var( 'post_type' );
     84        if ( is_array( $post_type ) )
     85                $post_type = reset( $post_type );
     86       
     87        $obj = get_post_type_object( $post_type );
    8488        if ( ! $obj->has_archive )
    8589                return '';
Note: See TracChangeset for help on using the changeset viewer.