Changeset 45817
- Timestamp:
- 08/16/2019 12:23:40 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/general-template.php
r45816 r45817 1555 1555 */ 1556 1556 function get_the_archive_title() { 1557 $title = __( 'Archives' ); 1558 1557 1559 if ( is_category() ) { 1558 1560 /* translators: Category archive title. %s: Category name */ … … 1597 1599 $title = sprintf( __( 'Archives: %s' ), post_type_archive_title( '', false ) ); 1598 1600 } elseif ( is_tax() ) { 1599 $tax = get_taxonomy( get_queried_object()->taxonomy ); 1600 /* translators: Taxonomy term archive title. 1: Taxonomy singular name, 2: Current taxonomy term */ 1601 $title = sprintf( __( '%1$s: %2$s' ), $tax->labels->singular_name, single_term_title( '', false ) ); 1602 } else { 1603 $title = __( 'Archives' ); 1601 $queried_object = get_queried_object(); 1602 if ( $queried_object ) { 1603 $tax = get_taxonomy( $queried_object->taxonomy ); 1604 /* translators: Taxonomy term archive title. 1: Taxonomy singular name, 2: Current taxonomy term */ 1605 $title = sprintf( __( '%1$s: %2$s' ), $tax->labels->singular_name, single_term_title( '', false ) ); 1606 } 1604 1607 } 1605 1608 … … 2909 2912 } 2910 2913 } elseif ( is_tax() ) { 2911 $term = get_queried_object(); 2912 $tax = get_taxonomy( $term->taxonomy ); 2913 $title = sprintf( $args['taxtitle'], get_bloginfo( 'name' ), $args['separator'], $term->name, $tax->labels->singular_name ); 2914 $href = get_term_feed_link( $term->term_id, $term->taxonomy ); 2914 $term = get_queried_object(); 2915 2916 if ( $term ) { 2917 $tax = get_taxonomy( $term->taxonomy ); 2918 $title = sprintf( $args['taxtitle'], get_bloginfo( 'name' ), $args['separator'], $term->name, $tax->labels->singular_name ); 2919 $href = get_term_feed_link( $term->term_id, $term->taxonomy ); 2920 } 2915 2921 } elseif ( is_author() ) { 2916 2922 $author_id = intval( get_query_var( 'author' ) );
Note: See TracChangeset
for help on using the changeset viewer.