Changeset 25291 for trunk/src/wp-includes/general-template.php
- Timestamp:
- 09/06/2013 10:06:40 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/general-template.php
r25207 r25291 578 578 } 579 579 580 // If there's a post type archive 581 if ( is_post_type_archive() ) { 582 $post_type_object = get_post_type_object( get_query_var( 'post_type' ) ); 583 if ( ! $post_type_object->has_archive ) 584 $title = post_type_archive_title( '', false ); 585 } 586 580 587 // If there's a category or tag 581 588 if ( is_category() || is_tag() ) { … … 596 603 } 597 604 598 // If there's a post type archive599 if ( is_post_type_archive() )605 // Post type archives with has_archive should override terms. 606 if ( is_post_type_archive() && $post_type_object->has_archive ) 600 607 $title = post_type_archive_title( '', false ); 601 608 … … 697 704 return; 698 705 699 $post_type_obj = get_ queried_object();706 $post_type_obj = get_post_type_object( get_query_var( 'post_type' ) ); 700 707 $title = apply_filters('post_type_archive_title', $post_type_obj->labels->name ); 701 708 … … 1671 1678 $args = wp_parse_args( $args, $defaults ); 1672 1679 1673 if ( is_sing le() || is_page() ) {1680 if ( is_singular() ) { 1674 1681 $id = 0; 1675 1682 $post = get_post( $id ); … … 1679 1686 $href = get_post_comments_feed_link( $post->ID ); 1680 1687 } 1688 } elseif ( is_post_type_archive() ) { 1689 $post_type_obj = get_post_type_object( get_query_var( 'post_type' ) ); 1690 $title = sprintf( $args['posttypetitle'], get_bloginfo( 'name' ), $args['separator'], $post_type_obj->labels->name ); 1691 $href = get_post_type_archive_feed_link( $post_type_obj->name ); 1681 1692 } elseif ( is_category() ) { 1682 1693 $term = get_queried_object();
Note: See TracChangeset
for help on using the changeset viewer.