Changeset 53329 for trunk/src/wp-includes/blocks/comment-author-name.php
- Timestamp:
- 05/02/2022 10:36:45 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/comment-author-name.php
r53157 r53329 19 19 } 20 20 21 $comment = get_comment( $block->context['commentId'] ); 21 $comment = get_comment( $block->context['commentId'] ); 22 $commenter = wp_get_current_commenter(); 23 $show_pending_links = isset( $commenter['comment_author'] ) && $commenter['comment_author']; 22 24 if ( empty( $comment ) ) { 23 25 return ''; … … 26 28 $classes = ''; 27 29 if ( isset( $attributes['textAlign'] ) ) { 28 $classes .= 'has-text-align-' . esc_attr( $attributes['textAlign'] ); 29 } 30 if ( isset( $attributes['fontSize'] ) ) { 31 $classes .= 'has-' . esc_attr( $attributes['fontSize'] ) . '-font-size'; 30 $classes .= 'has-text-align-' . $attributes['textAlign']; 32 31 } 33 32 … … 38 37 if ( ! empty( $attributes['isLink'] ) && ! empty( $attributes['linkTarget'] ) ) { 39 38 $comment_author = sprintf( '<a rel="external nofollow ugc" href="%1s" target="%2s" >%3s</a>', esc_url( $link ), esc_attr( $attributes['linkTarget'] ), $comment_author ); 39 } 40 if ( '0' === $comment->comment_approved && ! $show_pending_links ) { 41 $comment_author = wp_kses( $comment_author, array() ); 40 42 } 41 43
Note: See TracChangeset
for help on using the changeset viewer.