Make WordPress Core


Ignore:
Timestamp:
12/18/2018 10:45: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.

.com/WordPress/twentynineteen/pull/47

.com/WordPress/twentynineteen/pull/661

Props kjellr, allancole, dimadin, westonruter, khleomix, grapplerulrich, iCaleb, desrosj.

Merges [44196], [44199], and [44201-44202] into trunk.

Fixes #45424.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php

    r44155 r44305  
    3434                                        <div class="comment-author vcard">
    3535                                                <?php
    36                                                         $comment_author_link = get_comment_author_link( $comment );
    37                                                         $comment_author_url  = get_comment_author_url( $comment );
    38                                                         $comment_author      = get_comment_author( $comment );
    39                                                         $avatar              = get_avatar( $comment, $args['avatar_size'] );
     36                                                $comment_author_link = get_comment_author_link( $comment );
     37                                                $comment_author_url  = get_comment_author_url( $comment );
     38                                                $comment_author      = get_comment_author( $comment );
     39                                                $avatar              = get_avatar( $comment, $args['avatar_size'] );
    4040                                                if ( 0 != $args['avatar_size'] ) {
    4141                                                        if ( empty( $comment_author_url ) ) {
     
    4646                                                        }
    4747                                                }
    48 
    49                                                         /*
    50                                                          * Using the `check` icon instead of `check_circle`, since we can't add a
    51                                                          * fill color to the inner check shape when in circle form.
    52                                                          */
     48                                                /*
     49                                                 * Using the `check` icon instead of `check_circle`, since we can't add a
     50                                                 * fill color to the inner check shape when in circle form.
     51                                                 */
    5352                                                if ( twentynineteen_is_comment_by_post_author( $comment ) ) {
    54                                                         /* translators: %s: SVG Icon */
    5553                                                        printf( '<span class="post-author-badge" aria-hidden="true">%s</span>', twentynineteen_get_icon_svg( 'check', 24 ) );
    5654                                                }
    5755
    58                                                         printf(
    59                                                                 /* translators: %s: comment author link */
     56                                                /*
     57                                                 * Using the `check` icon instead of `check_circle`, since we can't add a
     58                                                 * fill color to the inner check shape when in circle form.
     59                                                 */
     60                                                if ( twentynineteen_is_comment_by_post_author( $comment ) ) {
     61                                                        printf( '<span class="post-author-badge" aria-hidden="true">%s</span>', twentynineteen_get_icon_svg( 'check', 24 ) );
     62                                                }
     63
     64                                                printf(
     65                                                        /* translators: %s: comment author link */
     66                                                        wp_kses(
    6067                                                                __( '%s <span class="screen-reader-text says">says:</span>', 'twentynineteen' ),
    61                                                                 sprintf( '<span class="fn">%s</span>', $comment_author )
    62                                                         );
     68                                                                array(
     69                                                                        'span' => array(
     70                                                                                'class' => array(),
     71                                                                        ),
     72                                                                )
     73                                                        ),
     74                                                        '<b class="fn">' . get_comment_author_link( $comment ) . '</b>'
     75                                                );
    6376
    6477                                                if ( ! empty( $comment_author_url ) ) {
     
    111124                <?php
    112125        }
    113 
    114126}
Note: See TracChangeset for help on using the changeset viewer.