Make WordPress Core


Ignore:
Timestamp:
12/16/2014 12:59:59 PM (8 years ago)
Author:
ocean90
Message:

Twenty Fifteen: Don't escape translated strings.

Replace every unnecessary instance of esc_html__() and esc_html_e() with just __() and _e().

see #30724.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfifteen/inc/template-tags.php

    r30781 r30896  
    2121    ?>
    2222    <nav class="navigation comment-navigation" role="navigation">
    23         <h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'twentyfifteen' ); ?></h2>
     23        <h2 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfifteen' ); ?></h2>
    2424        <div class="nav-links">
    2525            <?php
    26                 if ( $prev_link = get_previous_comments_link( esc_html__( 'Older Comments', 'twentyfifteen' ) ) ) :
     26                if ( $prev_link = get_previous_comments_link( __( 'Older Comments', 'twentyfifteen' ) ) ) :
    2727                    printf( '<div class="nav-previous">%s</div>', $prev_link );
    2828                endif;
    2929
    30                 if ( $next_link = get_next_comments_link( esc_html__( 'Newer Comments', 'twentyfifteen' ) ) ) :
     30                if ( $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) ) ) :
    3131                    printf( '<div class="nav-next">%s</div>', $next_link );
    3232                endif;
     
    4747function twentyfifteen_entry_meta() {
    4848    if ( is_sticky() && is_home() && ! is_paged() ) {
    49         printf( '<span class="sticky-post">%s</span>', esc_html__( 'Featured', 'twentyfifteen' ) );
     49        printf( '<span class="sticky-post">%s</span>', __( 'Featured', 'twentyfifteen' ) );
    5050    }
    5151
     
    120120    if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
    121121        echo '<span class="comments-link">';
    122         comments_popup_link( esc_html__( 'Leave a comment', 'twentyfifteen' ), esc_html__( '1 Comment', 'twentyfifteen' ), esc_html__( '% Comments', 'twentyfifteen' ) );
     122        comments_popup_link( __( 'Leave a comment', 'twentyfifteen' ), __( '1 Comment', 'twentyfifteen' ), __( '% Comments', 'twentyfifteen' ) );
    123123        echo '</span>';
    124124    }
     
    235235        esc_url( get_permalink( get_the_ID() ) ),
    236236        /* translators: %s: Name of current post */
    237         sprintf( esc_html__( 'Continue reading %s', 'twentyfifteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
     237        sprintf( __( 'Continue reading %s', 'twentyfifteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
    238238        );
    239239    return ' &hellip; ' . $link;
Note: See TracChangeset for help on using the changeset viewer.