diff --git a/public_html/wp-content/plugins/pattern-creator/includes/mock-blocks.php b/public_html/wp-content/plugins/pattern-creator/includes/mock-blocks.php index 4d3e9b3f1..214d78a71 100644 --- a/public_html/wp-content/plugins/pattern-creator/includes/mock-blocks.php +++ b/public_html/wp-content/plugins/pattern-creator/includes/mock-blocks.php @@ -101,6 +101,12 @@ function render_latest_comments( $block_content, $block, $block_instance ) { $attributes = $block_instance->attributes; $list_items_markup = ''; + if ( isset( $attributes['displayExcerpt'] ) ) { + $display_content = $attributes['displayExcerpt'] ? 'excerpt' : 'none'; + } else { + $display_content = isset( $attributes['displayContent'] ) ? $attributes['displayContent'] : 'excerpt'; + } + /* Note: This is not translated (for now) because the post content is also not translated. */ $comments = array( [ @@ -151,7 +157,9 @@ function render_latest_comments( $block_content, $block, $block_instance ) { ); } $list_items_markup .= ''; - if ( $attributes['displayExcerpt'] ) { + if ( 'full' === $display_content ) { + $list_items_markup .= '
' . wpautop( $comment['content'] ) . '
'; + } elseif ( 'excerpt' === $display_content ) { $list_items_markup .= '
' . $comment['content'] . '
'; } $list_items_markup .= ''; @@ -164,7 +172,7 @@ function render_latest_comments( $block_content, $block, $block_instance ) { if ( $attributes['displayDate'] ) { $classnames[] = 'has-dates'; } - if ( $attributes['displayExcerpt'] ) { + if ( 'none' !== $display_content ) { $classnames[] = 'has-excerpts'; }