WordPress.org

Make WordPress Core

Ticket #38545: 38545.diff

File 38545.diff, 2.8 KB (added by milindmore22, 2 years ago)

proper patch

  • src/wp-includes/general-template.php

    diff --git src/wp-includes/general-template.php src/wp-includes/general-template.php
    index 715dab7..b98d4bf 100644
    function the_archive_title( $before = '', $after = '' ) { 
    14621462function get_the_archive_title() {
    14631463        if ( is_category() ) {
    14641464                /* translators: Category archive title. 1: Category name */
    1465                 $title = sprintf( __( 'Category: %s' ), single_cat_title( '', false ) );
     1465                $title = sprintf( __( 'Category: %s' ), '<span>' . single_cat_title( '', false ) . '</span>' );
    14661466        } elseif ( is_tag() ) {
    14671467                /* translators: Tag archive title. 1: Tag name */
    1468                 $title = sprintf( __( 'Tag: %s' ), single_tag_title( '', false ) );
     1468                $title = sprintf( __( 'Tag: %s' ), '<span>' .  single_tag_title( '', false ) . '</span>' );
    14691469        } elseif ( is_author() ) {
    14701470                /* translators: Author archive title. 1: Author name */
    14711471                $title = sprintf( __( 'Author: %s' ), '<span class="vcard">' . get_the_author() . '</span>' );
    14721472        } elseif ( is_year() ) {
    14731473                /* translators: Yearly archive title. 1: Year */
    1474                 $title = sprintf( __( 'Year: %s' ), get_the_date( _x( 'Y', 'yearly archives date format' ) ) );
     1474                $title = sprintf( __( 'Year: %s' ), '<span>' .  get_the_date( _x( 'Y', 'yearly archives date format' ) ) . '</span>' );
    14751475        } elseif ( is_month() ) {
    14761476                /* translators: Monthly archive title. 1: Month name and year */
    1477                 $title = sprintf( __( 'Month: %s' ), get_the_date( _x( 'F Y', 'monthly archives date format' ) ) );
     1477                $title = sprintf( __( 'Month: %s' ), '<span>' .  get_the_date( _x( 'F Y', 'monthly archives date format' ) ) . '</span>' );
    14781478        } elseif ( is_day() ) {
    14791479                /* translators: Daily archive title. 1: Date */
    1480                 $title = sprintf( __( 'Day: %s' ), get_the_date( _x( 'F j, Y', 'daily archives date format' ) ) );
     1480                $title = sprintf( __( 'Day: %s' ), '<span>' .  get_the_date( _x( 'F j, Y', 'daily archives date format' ) ). '</span>' );
    14811481        } elseif ( is_tax( 'post_format' ) ) {
    14821482                if ( is_tax( 'post_format', 'post-format-aside' ) ) {
    14831483                        $title = _x( 'Asides', 'post format archive title' );
    function get_the_archive_title() { 
    15001500                }
    15011501        } elseif ( is_post_type_archive() ) {
    15021502                /* translators: Post type archive title. 1: Post type name */
    1503                 $title = sprintf( __( 'Archives: %s' ), post_type_archive_title( '', false ) );
     1503                $title = sprintf( __( 'Archives: %s' ), '<span>' . post_type_archive_title( '', false ) . '</span>' );
    15041504        } elseif ( is_tax() ) {
    15051505                $tax = get_taxonomy( get_queried_object()->taxonomy );
    15061506                /* translators: Taxonomy term archive title. 1: Taxonomy singular name, 2: Current taxonomy term */
    1507                 $title = sprintf( __( '%1$s: %2$s' ), $tax->labels->singular_name, single_term_title( '', false ) );
     1507                $title = sprintf( __( '%1$s: %2$s' ), $tax->labels->singular_name, '<span>' . single_term_title( '', false ) . '</span>' );
    15081508        } else {
    15091509                $title = __( 'Archives' );
    15101510        }