WordPress.org

Make WordPress Core

Changeset 30926


Ignore:
Timestamp:
12/16/2014 08:51:10 PM (6 years ago)
Author:
johnbillion
Message:

Twenty Fifteen: Remove various unnecessary esc_html() calls and replace various unnecessary esc_html_x() calls with _x().

Merges [30899], [30901], and [30905] into 4.1.

Props ocean90
Fixes #30724

Location:
branches/4.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1

  • branches/4.1/src/wp-content/themes/twentyfifteen/inc/template-tags.php

    r30924 r30926  
    5353    if ( current_theme_supports( 'post-formats', $format ) ) {
    5454        printf( '<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>',
    55             sprintf( '<span class="screen-reader-text">%s </span>', esc_html_x( 'Format', 'Used before post format.', 'twentyfifteen' ) ),
     55            sprintf( '<span class="screen-reader-text">%s </span>', _x( 'Format', 'Used before post format.', 'twentyfifteen' ) ),
    5656            esc_url( get_post_format_link( $format ) ),
    5757            get_post_format_string( $format )
     
    6868        $time_string = sprintf( $time_string,
    6969            esc_attr( get_the_date( 'c' ) ),
    70             esc_html( get_the_date() ),
     70            get_the_date(),
    7171            esc_attr( get_the_modified_date( 'c' ) ),
    72             esc_html( get_the_modified_date() )
     72            get_the_modified_date()
    7373        );
    7474
    7575        printf( '<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>',
    76             esc_html_x( 'Posted on', 'Used before publish date.', 'twentyfifteen' ),
     76            _x( 'Posted on', 'Used before publish date.', 'twentyfifteen' ),
    7777            esc_url( get_permalink() ),
    7878            $time_string
     
    8383        if ( is_singular() || is_multi_author() ) {
    8484            printf( '<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>',
    85                 esc_html_x( 'Author', 'Used before post author name.', 'twentyfifteen' ),
     85                _x( 'Author', 'Used before post author name.', 'twentyfifteen' ),
    8686                esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    87                 esc_html( get_the_author() )
     87                get_the_author()
    8888            );
    8989        }
     
    9292        if ( $categories_list && twentyfifteen_categorized_blog() ) {
    9393            printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
    94                 esc_html_x( 'Categories', 'Used before category names.', 'twentyfifteen' ),
     94                _x( 'Categories', 'Used before category names.', 'twentyfifteen' ),
    9595                $categories_list
    9696            );
     
    100100        if ( $tags_list ) {
    101101            printf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
    102                 esc_html_x( 'Tags', 'Used before tag names.', 'twentyfifteen' ),
     102                _x( 'Tags', 'Used before tag names.', 'twentyfifteen' ),
    103103                $tags_list
    104104            );
     
    111111
    112112        printf( '<span class="full-size-link"><span class="screen-reader-text">%1$s </span><a href="%2$s">%3$s &times; %4$s</a></span>',
    113             esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentyfifteen' ),
     113            _x( 'Full size', 'Used before full size attachment link.', 'twentyfifteen' ),
    114114            esc_url( wp_get_attachment_url() ),
    115115            $metadata['width'],
Note: See TracChangeset for help on using the changeset viewer.