diff --git src/wp-includes/general-template.php src/wp-includes/general-template.php
index b116beb14e..af3d4af034 100644
|
|
function get_the_archive_title() { |
1596 | 1596 | /* translators: Post type archive title. %s: Post type name */ |
1597 | 1597 | $title = sprintf( __( 'Archives: %s' ), post_type_archive_title( '', false ) ); |
1598 | 1598 | } 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 ) ); |
| 1599 | $queried_object = get_queried_object(); |
| 1600 | |
| 1601 | if ( $queried_object ) { |
| 1602 | $tax = get_taxonomy( get_queried_object()->taxonomy ); |
| 1603 | /* translators: Taxonomy term archive title. 1: Taxonomy singular name, 2: Current taxonomy term */ |
| 1604 | $title = sprintf( __( '%1$s: %2$s' ), $tax->labels->singular_name, single_term_title( '', false ) ); |
| 1605 | } |
| 1606 | else { |
| 1607 | $title = __( 'Not found' ); |
| 1608 | } |
1602 | 1609 | } else { |
1603 | 1610 | $title = __( 'Archives' ); |
1604 | 1611 | } |
… |
… |
function feed_links_extra( $args = array() ) { |
2909 | 2916 | } |
2910 | 2917 | } elseif ( is_tax() ) { |
2911 | 2918 | $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 ); |
| 2919 | |
| 2920 | if ( $term ) { |
| 2921 | $tax = get_taxonomy( $term->taxonomy ); |
| 2922 | $title = sprintf( $args['taxtitle'], get_bloginfo( 'name' ), $args['separator'], $term->name, $tax->labels->singular_name ); |
| 2923 | $href = get_term_feed_link( $term->term_id, $term->taxonomy ); |
| 2924 | } |
2915 | 2925 | } elseif ( is_author() ) { |
2916 | 2926 | $author_id = intval( get_query_var( 'author' ) ); |
2917 | 2927 | |