WordPress.org

Make WordPress Core

Changeset 16792


Ignore:
Timestamp:
12/08/2010 08:57:38 AM (7 years ago)
Author:
scribu
Message:

Set queried object on CPT archives. Fixes #15730

Location:
trunk/wp-includes
Files:
2 edited

Legend:

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

    r16749 r16792  
    668668        return;
    669669
    670 
    671     $post_type_obj = get_post_type_object( get_query_var( 'post_type' ) );
     670    $post_type_obj = get_queried_object();
    672671    $title = apply_filters('post_type_archive_title', $post_type_obj->labels->name );
    673672
  • trunk/wp-includes/query.php

    r16576 r16792  
    26762676                $this->queried_object_id = (int) $term->term_id;
    26772677            }
     2678        } elseif ( $this->is_post_type_archive ) {
     2679            $this->queried_object = get_post_type_object( $this->get('post_type') );
    26782680        } elseif ( $this->is_posts_page ) {
    26792681            $page_for_posts = get_option('page_for_posts');
Note: See TracChangeset for help on using the changeset viewer.