WordPress.org

Make WordPress Core

Ticket #26553: 26553.3.diff

File 26553.3.diff, 1.8 KB (added by pento, 6 years ago)
  • src/wp-includes/comment-template.php

     
    12741274        global $wpcommentspopupfile, $wpcommentsjavascript;
    12751275
    12761276        $id = get_the_ID();
    1277         $span = '<span class="screen-reader-text">';
    12781277        $title = get_the_title();
    1279         $span_close = '</span>';
    12801278
    12811279        $number = get_comments_number( $id );
    12821280
    12831281        if ( false === $zero ) {
    1284                 /* translators: 1: Opening span tag with a class, 2: post title, 3: closing span tag */
    1285                 $zero = sprintf( __( 'No Comments%1$s on %2$s%3$s' ), $span, $title, $span_close );
     1282                $zero = sprintf( __( 'No Comments<span class="screen-reader-text"> on %s</span>' ), $title );
    12861283        }
    12871284        if ( false === $one ) {
    1288                 /* translators: 1: Opening span tag with a class, 2: post title, 3: closing span tag */
    1289                 $one = sprintf( __( '1 Comment%1$s on %2$s%3$s' ), $span, $title, $span_close );
     1285                $one = sprintf( __( '1 Comment<span class="screen-reader-text"> on %s</span>' ), $title );
    12901286        }
    12911287        if ( false === $more ) {
    1292                 /* translators: 1: Opening span tag with a class, 2: post title, 3: closing span tag, 4: number of comments */
    1293                 $more = sprintf( __( '%4$d Comments%1$s on %2$s%3$s' ), $span, $title, $span_close, $number );
     1288                $more = sprintf( __( '%2$d Comments<span class="screen-reader-text"> on %1$s</span>' ), $title, $number );
    12941289        }
    12951290        if ( false === $none ) {
    1296                 /* translators: 1: Opening span tag with a class, 2: post title, 3: closing span tag */
    1297                 $none = sprintf( __( 'Comments Off%1$s on %2$s%3$s' ), $span, $title, $span_close );
     1291                $none = sprintf( __( 'Comments Off<span class="screen-reader-text"> on %s</span>' ), $title );
    12981292        }
    12991293
    13001294        if ( 0 == $number && !comments_open() && !pings_open() ) {