Make WordPress Core


Ignore:
Timestamp:
12/14/2018 09:50:16 PM (8 years ago)
Author:
desrosj
Message:

Twenty Nineteen: Fixes and improvements.

This commit brings over several changes that occurred upstream in the theme’s GitHub repository into core.

Props khleomix, grapplerulrich, iCaleb, kjellr, allancole.

See #45424.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-content/themes/twentynineteen/comments.php

    r43892 r44199  
    2929                <h2 class="comments-title">
    3030                <?php
    31                         if ( comments_open() ) {
    32                                 if ( have_comments() ) {
    33                                         _e( 'Join the Conversation', 'twentynineteen' );
    34                                 } else {
    35                                         _e( 'Leave a comment', 'twentynineteen' );
    36                                 }
     31                if ( comments_open() ) {
     32                        if ( have_comments() ) {
     33                                _e( 'Join the Conversation', 'twentynineteen' );
    3734                        } else {
    38                                 if ( '1' == $discussion->responses ) {
    39                                         /* translators: %s: post title */
    40                                         printf( _x( 'One reply on &ldquo;%s&rdquo;', 'comments title', 'twentynineteen' ), get_the_title() );
    41                                 } else {
    42                                         printf(
    43                                                 /* translators: 1: number of comments, 2: post title */
    44                                                 _nx(
    45                                                         '%1$s reply on &ldquo;%2$s&rdquo;',
    46                                                         '%1$s replies on &ldquo;%2$s&rdquo;',
    47                                                         $discussion->responses,
    48                                                         'comments title',
    49                                                         'twentynineteen'
    50                                                 ),
    51                                                 number_format_i18n( $discussion->responses ),
    52                                                 get_the_title()
    53                                         );
    54                                 }
     35                                _e( 'Leave a comment', 'twentynineteen' );
    5536                        }
     37                } else {
     38                        if ( '1' == $discussion->responses ) {
     39                                /* translators: %s: post title */
     40                                printf( _x( 'One reply on &ldquo;%s&rdquo;', 'comments title', 'twentynineteen' ), get_the_title() );
     41                        } else {
     42                                printf(
     43                                        /* translators: 1: number of comments, 2: post title */
     44                                        _nx(
     45                                                '%1$s reply on &ldquo;%2$s&rdquo;',
     46                                                '%1$s replies on &ldquo;%2$s&rdquo;',
     47                                                $discussion->responses,
     48                                                'comments title',
     49                                                'twentynineteen'
     50                                        ),
     51                                        number_format_i18n( $discussion->responses ),
     52                                        get_the_title()
     53                                );
     54                        }
     55                }
    5656                ?>
    5757                </h2><!-- .comments-title -->
    5858                <?php
    5959                        // Only show discussion meta information when comments are open and available.
    60                         if ( have_comments() && comments_open() ) {
     60                if ( have_comments() && comments_open() ) {
    6161                        get_template_part( 'template-parts/post/discussion', 'meta' );
    62                         }
     62                }
    6363                ?>
    6464        </div><!-- .comments-title-flex -->
Note: See TracChangeset for help on using the changeset viewer.