Make WordPress Core


Ignore:
Timestamp:
12/16/2016 10:07:41 PM (8 years ago)
Author:
davidakennedy
Message:

Twenty Seventeen: Improves code readability and code standards in files

Adds better DocBlock comments and fixes some spacing issues based on PHP_CodeSniffer WordPress coding standards.

Props sstoqnov.

Fixes #39152.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyseventeen/comments.php

    r39072 r39618  
    3131        <h2 class="comments-title">
    3232            <?php
    33                 $comments_number = get_comments_number();
    34                 if ( '1' === $comments_number ) {
    35                     /* translators: %s: post title */
    36                     printf( _x( 'One Reply to &ldquo;%s&rdquo;', 'comments title', 'twentyseventeen' ), get_the_title() );
    37                 } else {
    38                     printf(
    39                         /* translators: 1: number of comments, 2: post title */
    40                         _nx(
    41                             '%1$s Reply to &ldquo;%2$s&rdquo;',
    42                             '%1$s Replies to &ldquo;%2$s&rdquo;',
    43                             $comments_number,
    44                             'comments title',
    45                             'twentyseventeen'
    46                         ),
    47                         number_format_i18n( $comments_number ),
    48                         get_the_title()
    49                     );
    50                 }
     33            $comments_number = get_comments_number();
     34            if ( '1' === $comments_number ) {
     35                /* translators: %s: post title */
     36                printf( _x( 'One Reply to &ldquo;%s&rdquo;', 'comments title', 'twentyseventeen' ), get_the_title() );
     37            } else {
     38                printf(
     39                    /* translators: 1: number of comments, 2: post title */
     40                    _nx(
     41                        '%1$s Reply to &ldquo;%2$s&rdquo;',
     42                        '%1$s Replies to &ldquo;%2$s&rdquo;',
     43                        $comments_number,
     44                        'comments title',
     45                        'twentyseventeen'
     46                    ),
     47                    number_format_i18n( $comments_number ),
     48                    get_the_title()
     49                );
     50            }
    5151            ?>
    5252        </h2>
Note: See TracChangeset for help on using the changeset viewer.