diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php
index 46e585df12..6ec6825306 100644
a
|
b
|
function the_archive_title( $before = '', $after = '' ) { |
1597 | 1597 | */ |
1598 | 1598 | function get_the_archive_title() { |
1599 | 1599 | $title = __( 'Archives' ); |
| 1600 | $prefix = ''; |
1600 | 1601 | |
1601 | 1602 | if ( is_category() ) { |
1602 | | /* translators: Category archive title. %s: Category name. */ |
1603 | | $title = sprintf( __( 'Category: %s' ), single_cat_title( '', false ) ); |
| 1603 | $title = single_cat_title( '', false ); |
| 1604 | $prefix = __( 'Category:' ); |
1604 | 1605 | } elseif ( is_tag() ) { |
1605 | | /* translators: Tag archive title. %s: Tag name. */ |
1606 | | $title = sprintf( __( 'Tag: %s' ), single_tag_title( '', false ) ); |
| 1606 | $title = single_tag_title( '', false ); |
| 1607 | $prefix = __( 'Tag:' ); |
1607 | 1608 | } elseif ( is_author() ) { |
1608 | | /* translators: Author archive title. %s: Author name. */ |
1609 | | $title = sprintf( __( 'Author: %s' ), '<span class="vcard">' . get_the_author() . '</span>' ); |
| 1609 | $title = '<span class="vcard">' . get_the_author() . '</span>'; |
| 1610 | $prefix = __( 'Author:' ); |
1610 | 1611 | } elseif ( is_year() ) { |
1611 | | /* translators: Yearly archive title. %s: Year. */ |
1612 | | $title = sprintf( __( 'Year: %s' ), get_the_date( _x( 'Y', 'yearly archives date format' ) ) ); |
| 1612 | $title = get_the_date( _x( 'Y', 'Yearly archives date format' ) ); |
| 1613 | $prefix = __( 'Year:' ); |
1613 | 1614 | } elseif ( is_month() ) { |
1614 | | /* translators: Monthly archive title. %s: Month name and year. */ |
1615 | | $title = sprintf( __( 'Month: %s' ), get_the_date( _x( 'F Y', 'monthly archives date format' ) ) ); |
| 1615 | $title = get_the_date( _x( 'F Y', 'Monthly archives date format' ) ); |
| 1616 | $prefix = __( 'Month:' ); |
1616 | 1617 | } elseif ( is_day() ) { |
1617 | | /* translators: Daily archive title. %s: Date. */ |
1618 | | $title = sprintf( __( 'Day: %s' ), get_the_date( _x( 'F j, Y', 'daily archives date format' ) ) ); |
| 1618 | $title = get_the_date( _x( 'F j, Y', 'Daily archives date format' ) ); |
| 1619 | $prefix = __( 'Day:' ); |
1619 | 1620 | } elseif ( is_tax( 'post_format' ) ) { |
1620 | 1621 | if ( is_tax( 'post_format', 'post-format-aside' ) ) { |
1621 | 1622 | $title = _x( 'Asides', 'post format archive title' ); |
… |
… |
function get_the_archive_title() { |
1637 | 1638 | $title = _x( 'Chats', 'post format archive title' ); |
1638 | 1639 | } |
1639 | 1640 | } elseif ( is_post_type_archive() ) { |
1640 | | /* translators: Post type archive title. %s: Post type name. */ |
1641 | | $title = sprintf( __( 'Archives: %s' ), post_type_archive_title( '', false ) ); |
| 1641 | $title = post_type_archive_title( '', false ); |
| 1642 | $prefix = __( 'Archives:' ); |
1642 | 1643 | } elseif ( is_tax() ) { |
1643 | 1644 | $queried_object = get_queried_object(); |
1644 | 1645 | if ( $queried_object ) { |
1645 | 1646 | $tax = get_taxonomy( $queried_object->taxonomy ); |
1646 | | /* translators: Taxonomy term archive title. 1: Taxonomy singular name, 2: Current taxonomy term. */ |
1647 | | $title = sprintf( __( '%1$s: %2$s' ), $tax->labels->singular_name, single_term_title( '', false ) ); |
| 1647 | $title = single_term_title( '', false ); |
| 1648 | /* translators: Taxonomy singular name. */ |
| 1649 | $prefix = sprintf( __( '%s:' ), $tax->labels->singular_name ); |
1648 | 1650 | } |
1649 | 1651 | } |
1650 | 1652 | |
| 1653 | /** |
| 1654 | * Filters the archive title prefix. |
| 1655 | * |
| 1656 | * @since 5.5.0 |
| 1657 | * |
| 1658 | * @param string $prefix Archive title prefix. |
| 1659 | */ |
| 1660 | $prefix = apply_filters( 'get_the_archive_title_prefix', $prefix ); |
| 1661 | /* translators: 1: Archive prefix. 2: Archive name. */ |
| 1662 | $title = sprintf( __( '%1$s %2$s' ), $prefix, $title ); |
| 1663 | |
1651 | 1664 | /** |
1652 | 1665 | * Filters the archive title. |
1653 | 1666 | * |