WordPress.org

Make WordPress Core

Changeset 38885


Ignore:
Timestamp:
10/24/2016 05:26:45 PM (3 years ago)
Author:
karmatosed
Message:

Twenty Seventeen: Fixes incorrect use of _x()

There is an incorrect use in twentyseventeen_posted_on(). This fixes that.

Props ocean90, dineshc, mbelchev, davidakennedy
Fixes #38383

File:
1 edited

Legend:

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

    r38872 r38885  
    1818    // Get the author name; wrap it in a link.
    1919    $byline = sprintf(
    20         _x( 'by %s', 'post author', 'twentyseventeen' ),
     20        /* translators: %s: post author */
     21        __( 'by %s', 'twentyseventeen' ),
    2122        '<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . get_the_author() . '</a></span>'
    2223    );
     
    4647
    4748    // Wrap the time string in a link, and preface it with 'Posted on'.
    48     return '<span class="screen-reader-text">' . _x( 'Posted on', 'post date', 'twentyseventeen' ) . '</span> <a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>';
     49    return sprintf(
     50        /* translators: %s: post date */
     51        __( '<span class="screen-reader-text">Posted on</span> %s', 'twentyseventeen' ),
     52        '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
     53    );
    4954}
    5055endif;
Note: See TracChangeset for help on using the changeset viewer.