diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php
index 11d4b77..5ec7e4b 100644
a
|
b
|
function the_archive_title( $before = '', $after = '' ) { |
1495 | 1495 | */ |
1496 | 1496 | function get_the_archive_title() { |
1497 | 1497 | if ( is_category() ) { |
1498 | | /* translators: Category archive title. %s: Category name */ |
1499 | | $title = sprintf( __( 'Category: %s' ), single_cat_title( '', false ) ); |
| 1498 | $title = single_cat_title( '', false ); |
| 1499 | $prefix = __( 'Category: ' ); |
1500 | 1500 | } elseif ( is_tag() ) { |
1501 | | /* translators: Tag archive title. %s: Tag name */ |
1502 | | $title = sprintf( __( 'Tag: %s' ), single_tag_title( '', false ) ); |
| 1501 | $title = single_tag_title( '', false ); |
| 1502 | $prefix = __( 'Tag: ' ); |
1503 | 1503 | } elseif ( is_author() ) { |
1504 | | /* translators: Author archive title. %s: Author name */ |
1505 | | $title = sprintf( __( 'Author: %s' ), '<span class="vcard">' . get_the_author() . '</span>' ); |
| 1504 | $title = '<span class="vcard">' . get_the_author() . '</span>'; |
| 1505 | $prefix = __( 'Author: ' ); |
1506 | 1506 | } elseif ( is_year() ) { |
1507 | | /* translators: Yearly archive title. %s: Year */ |
1508 | | $title = sprintf( __( 'Year: %s' ), get_the_date( _x( 'Y', 'yearly archives date format' ) ) ); |
| 1507 | $title = get_the_date( _x( 'Y', 'yearly archives date format' ) ); |
| 1508 | $prefix = __( 'Year: ' ); |
1509 | 1509 | } elseif ( is_month() ) { |
1510 | | /* translators: Monthly archive title. %s: Month name and year */ |
1511 | | $title = sprintf( __( 'Month: %s' ), get_the_date( _x( 'F Y', 'monthly archives date format' ) ) ); |
| 1510 | $title = get_the_date( _x( 'F Y', 'monthly archives date format' ) ); |
| 1511 | $prefix = __( 'Month: ' ); |
1512 | 1512 | } elseif ( is_day() ) { |
1513 | | /* translators: Daily archive title. %s: Date */ |
1514 | | $title = sprintf( __( 'Day: %s' ), get_the_date( _x( 'F j, Y', 'daily archives date format' ) ) ); |
| 1513 | $title = get_the_date( _x( 'F j, Y', 'daily archives date format' ) ); |
| 1514 | $prefix = __( 'Day: ' ); |
1515 | 1515 | } elseif ( is_tax( 'post_format' ) ) { |
| 1516 | $prefix = ''; |
1516 | 1517 | if ( is_tax( 'post_format', 'post-format-aside' ) ) { |
1517 | 1518 | $title = _x( 'Asides', 'post format archive title' ); |
1518 | 1519 | } elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) { |
… |
… |
function get_the_archive_title() { |
1533 | 1534 | $title = _x( 'Chats', 'post format archive title' ); |
1534 | 1535 | } |
1535 | 1536 | } elseif ( is_post_type_archive() ) { |
1536 | | /* translators: Post type archive title. %s: Post type name */ |
1537 | | $title = sprintf( __( 'Archives: %s' ), post_type_archive_title( '', false ) ); |
| 1537 | $title = post_type_archive_title( '', false ); |
| 1538 | $prefix = __( 'Archives: ' ); |
1538 | 1539 | } elseif ( is_tax() ) { |
| 1540 | $title = single_term_title( '', false ); |
1539 | 1541 | $tax = get_taxonomy( get_queried_object()->taxonomy ); |
1540 | | /* translators: Taxonomy term archive title. 1: Taxonomy singular name, 2: Current taxonomy term */ |
1541 | | $title = sprintf( __( '%1$s: %2$s' ), $tax->labels->singular_name, single_term_title( '', false ) ); |
| 1542 | /* translators: 1: Taxonomy singular name */ |
| 1543 | $prefix = sprintf( _x( '%1$s: ', 'Taxonomy singular name' ), $tax->labels->singular_name ); |
1542 | 1544 | } else { |
1543 | | $title = __( 'Archives' ); |
| 1545 | $title = ''; |
| 1546 | $prefix = __( 'Archives' ); |
1544 | 1547 | } |
1545 | | |
1546 | 1548 | /** |
1547 | | * Filters the archive title. |
| 1549 | * Filters the archive title prefix. |
| 1550 | * |
| 1551 | * @since 5.2 |
| 1552 | * |
| 1553 | * @param string $prefix Archive title prefix. |
| 1554 | */ |
| 1555 | $prefix = apply_filters( 'get_the_archive_title_prefix', $prefix ); |
| 1556 | /* translators: archive title with prefix. 1: archive prefix, 2: archive name */ |
| 1557 | $title = sprintf( __( '%1$s%2$s' ), $prefix, $title ); |
| 1558 | /** |
| 1559 | * Filters the archive title (with the archive title prefix). |
1548 | 1560 | * |
1549 | 1561 | * @since 4.1.0 |
1550 | 1562 | * |