diff --git a/src/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php b/src/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php index a6e0c345d1..51dc15c44a 100644 --- a/src/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php +++ b/src/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php @@ -33,36 +33,42 @@ class TwentyNineteen_Walker_Comment extends Walker_Comment { <footer class="comment-meta"> <div class="comment-author vcard"> <?php - $comment_author_link = get_comment_author_link( $comment ); - $comment_author_url = get_comment_author_url( $comment ); - $comment_author = get_comment_author( $comment ); - $avatar = get_avatar( $comment, $args['avatar_size'] ); - if ( 0 != $args['avatar_size'] ) { - if ( empty( $comment_author_url ) ) { - echo $avatar; - } else { - printf( '<a href="%s" rel="external nofollow" class="url">', $comment_author_url ); - echo $avatar; - } + $comment_author_link = get_comment_author_link( $comment ); + $comment_author_url = get_comment_author_url( $comment ); + $comment_author = get_comment_author( $comment ); + $avatar = get_avatar( $comment, $args['avatar_size'] ); + if ( 0 != $args['avatar_size'] ) { + if ( empty( $comment_author_url ) ) { + echo $avatar; + } else { + printf( '<a href="%s" rel="external nofollow" class="url">', $comment_author_url ); + echo $avatar; } + } + /* + * Using the `check` icon instead of `check_circle`, since we can't add a + * fill color to the inner check shape when in circle form. + */ + if ( twentynineteen_is_comment_by_post_author( $comment ) ) { + printf( '<span class="post-author-badge" aria-hidden="true">%s</span>', twentynineteen_get_icon_svg( 'check', 24 ) ); + } - /* - * Using the `check` icon instead of `check_circle`, since we can't add a - * fill color to the inner check shape when in circle form. - */ - if ( twentynineteen_is_comment_by_post_author( $comment ) ) { - printf( '<span class="post-author-badge" aria-hidden="true">%s</span>', twentynineteen_get_icon_svg( 'check', 24 ) ); - } - - printf( - /* translators: %s: comment author link */ + printf( + /* translators: %s: comment author link */ + wp_kses( __( '%s <span class="screen-reader-text says">says:</span>', 'twentynineteen' ), - sprintf( '<span class="fn">%s</span>', $comment_author ) - ); + array( + 'span' => array( + 'class' => array(), + ), + ) + ), + '<b class="fn">' . get_comment_author_link( $comment ) . '</b>' + ); - if ( ! empty( $comment_author_url ) ) { - echo '</a>'; - } + if ( ! empty( $comment_author_url ) ) { + echo '</a>'; + } ?> </div><!-- .comment-author --> diff --git a/src/wp-content/themes/twentynineteen/comments.php b/src/wp-content/themes/twentynineteen/comments.php index 7b21dca0c6..d74c1cff66 100644 --- a/src/wp-content/themes/twentynineteen/comments.php +++ b/src/wp-content/themes/twentynineteen/comments.php @@ -28,38 +28,38 @@ $discussion = twentynineteen_get_discussion_data(); <div class="<?php echo $discussion->responses > 0 ? 'comments-title-wrap' : 'comments-title-wrap no-responses'; ?>"> <h2 class="comments-title"> <?php - if ( comments_open() ) { - if ( have_comments() ) { - _e( 'Join the Conversation', 'twentynineteen' ); - } else { - _e( 'Leave a comment', 'twentynineteen' ); - } + if ( comments_open() ) { + if ( have_comments() ) { + _e( 'Join the Conversation', 'twentynineteen' ); } else { - if ( '1' == $discussion->responses ) { - /* translators: %s: post title */ - printf( _x( 'One reply on “%s”', 'comments title', 'twentynineteen' ), get_the_title() ); - } else { - printf( - /* translators: 1: number of comments, 2: post title */ - _nx( - '%1$s reply on “%2$s”', - '%1$s replies on “%2$s”', - $discussion->responses, - 'comments title', - 'twentynineteen' - ), - number_format_i18n( $discussion->responses ), - get_the_title() - ); - } + _e( 'Leave a comment', 'twentynineteen' ); } + } else { + if ( '1' == $discussion->responses ) { + /* translators: %s: post title */ + printf( _x( 'One reply on “%s”', 'comments title', 'twentynineteen' ), get_the_title() ); + } else { + printf( + /* translators: 1: number of comments, 2: post title */ + _nx( + '%1$s reply on “%2$s”', + '%1$s replies on “%2$s”', + $discussion->responses, + 'comments title', + 'twentynineteen' + ), + number_format_i18n( $discussion->responses ), + get_the_title() + ); + } + } ?> </h2><!-- .comments-title --> <?php // Only show discussion meta information when comments are open and available. - if ( have_comments() && comments_open() ) { + if ( have_comments() && comments_open() ) { get_template_part( 'template-parts/post/discussion', 'meta' ); - } + } ?> </div><!-- .comments-title-flex --> <?php diff --git a/src/wp-content/themes/twentynineteen/header.php b/src/wp-content/themes/twentynineteen/header.php index b815530c9c..d2b78499ff 100644 --- a/src/wp-content/themes/twentynineteen/header.php +++ b/src/wp-content/themes/twentynineteen/header.php @@ -37,7 +37,7 @@ $discussion = ! is_page() && twentynineteen_can_show_post_thumbnail() ? twentynineteen_get_discussion_data() : null; $classes = 'entry-header'; - if ( ! empty( $discussion ) && count( $discussion->responses ) > 0 ) { + if ( ! empty( $discussion ) && absint( $discussion->responses ) > 0 ) { $classes = 'entry-header has-discussion'; } ?> diff --git a/src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss b/src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss index 28572e0823..8c66457d5d 100644 --- a/src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss +++ b/src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss @@ -529,10 +529,6 @@ line-height: 1.25; padding: 0; color: #fff; - -ms-hyphens: auto; - -moz-hyphens: auto; - -webkit-hyphens: auto; - hyphens: auto; @include media(tablet) { font-size: $font__size-xl; diff --git a/src/wp-content/themes/twentynineteen/style-rtl.css b/src/wp-content/themes/twentynineteen/style-rtl.css index d0fc3e6627..bf4d3b0b71 100644 --- a/src/wp-content/themes/twentynineteen/style-rtl.css +++ b/src/wp-content/themes/twentynineteen/style-rtl.css @@ -3968,10 +3968,6 @@ body.page .main-navigation { line-height: 1.25; padding: 0; color: #fff; - -ms-hyphens: auto; - -moz-hyphens: auto; - -webkit-hyphens: auto; - hyphens: auto; } @media only screen and (min-width: 768px) { diff --git a/src/wp-content/themes/twentynineteen/style.css b/src/wp-content/themes/twentynineteen/style.css index 45b3e54366..3824df3c16 100644 --- a/src/wp-content/themes/twentynineteen/style.css +++ b/src/wp-content/themes/twentynineteen/style.css @@ -3980,10 +3980,6 @@ body.page .main-navigation { line-height: 1.25; padding: 0; color: #fff; - -ms-hyphens: auto; - -moz-hyphens: auto; - -webkit-hyphens: auto; - hyphens: auto; } @media only screen and (min-width: 768px) { diff --git a/src/wp-content/themes/twentynineteen/template-parts/post/author-bio.php b/src/wp-content/themes/twentynineteen/template-parts/post/author-bio.php index d1ba8c3f76..b9c144292f 100644 --- a/src/wp-content/themes/twentynineteen/template-parts/post/author-bio.php +++ b/src/wp-content/themes/twentynineteen/template-parts/post/author-bio.php @@ -10,8 +10,15 @@ if ( (bool) get_the_author_meta( 'description' ) ) : ?> <div class="author-bio"> <h2 class="author-title"> - <?php /* translators: %s: author name */ ?> - <span class="author-heading"><?php echo esc_html( sprintf( __( 'Published by %s', 'twentynineteen' ), get_the_author() ) ); ?></span> + <span class="author-heading"> + <?php + printf( + /* translators: %s: post author */ + __( 'Published by %s', 'twentynineteen' ), + esc_html( get_the_author() ) + ); + ?> + </span> </h2> <p class="author-description"> <?php the_author_meta( 'description' ); ?> diff --git a/src/wp-content/themes/twentynineteen/template-parts/post/discussion-meta.php b/src/wp-content/themes/twentynineteen/template-parts/post/discussion-meta.php index b09ea0ff04..add281d3cc 100644 --- a/src/wp-content/themes/twentynineteen/template-parts/post/discussion-meta.php +++ b/src/wp-content/themes/twentynineteen/template-parts/post/discussion-meta.php @@ -17,7 +17,6 @@ if ( $has_responses ) { } else { $meta_label = __( 'No comments', 'twentynineteen' ); } - ?> <div class="discussion-meta">