| @@ -119,9 +119,12 @@ | ||
| 119 | 119 | ); |
| 120 | 120 | } |
| 121 | 121 | $list_items_markup .= '</footer>'; |
| 122 | 122 | if ( 'full' === $display_content ) { |
| 123 | - $list_items_markup .= '<div class="wp-block-latest-comments__comment-excerpt">' . wpautop( get_comment_text( $comment ) ) . '</div>'; | |
| 123 | + $comment_text = post_password_required( $comment->comment_post_ID ) | |
| 124 | + ? __( 'Password protected' ) | |
| 125 | + : get_comment_text( $comment ); | |
| 126 | + $list_items_markup .= '<div class="wp-block-latest-comments__comment-excerpt">' . wpautop( $comment_text ) . '</div>'; | |
| 124 | 127 | } elseif ( 'excerpt' === $display_content ) { |
| 125 | 128 | $list_items_markup .= '<div class="wp-block-latest-comments__comment-excerpt">' . wpautop( get_comment_excerpt( $comment ) ) . '</div>'; |
| 126 | 129 | } |
| 127 | 130 | $list_items_markup .= '</article></li>'; |