Changeset 25312 for trunk/src/wp-includes/general-template.php
- Timestamp:
- 09/10/2013 03:01:10 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/general-template.php
r25310 r25312 580 580 // If there's a post type archive 581 581 if ( is_post_type_archive() ) { 582 $post_type_object = get_post_type_object( get_query_var( 'post_type' ) ); 582 $post_type = get_query_var( 'post_type' ); 583 if ( is_array( $post_type ) ) 584 $post_type = reset( $post_type ); 585 $post_type_object = get_post_type_object( $post_type ); 583 586 if ( ! $post_type_object->has_archive ) 584 587 $title = post_type_archive_title( '', false ); … … 707 710 return; 708 711 709 $post_type_obj = get_post_type_object( get_query_var( 'post_type' ) ); 712 $post_type = get_query_var( 'post_type' ); 713 if ( is_array( $post_type ) ) 714 $post_type = reset( $post_type ); 715 716 $post_type_obj = get_post_type_object( $post_type ); 710 717 $title = apply_filters('post_type_archive_title', $post_type_obj->labels->name ); 711 718 … … 1690 1697 } 1691 1698 } elseif ( is_post_type_archive() ) { 1692 $post_type_obj = get_post_type_object( get_query_var( 'post_type' ) ); 1699 $post_type = get_query_var( 'post_type' ); 1700 if ( is_array( $post_type ) ) 1701 $post_type = reset( $post_type ); 1702 1703 $post_type_obj = get_post_type_object( $post_type ); 1693 1704 $title = sprintf( $args['posttypetitle'], get_bloginfo( 'name' ), $args['separator'], $post_type_obj->labels->name ); 1694 1705 $href = get_post_type_archive_feed_link( $post_type_obj->name );
Note: See TracChangeset
for help on using the changeset viewer.