Changeset 52042 for trunk/src/wp-includes/blocks/post-excerpt.php
- Timestamp:
- 11/08/2021 02:26:27 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/post-excerpt.php
r51443 r52042 16 16 function render_block_core_post_excerpt( $attributes, $content, $block ) { 17 17 if ( ! isset( $block->context['postId'] ) ) { 18 return ''; 19 } 20 21 $excerpt = get_the_excerpt( $block->context['postId'] ); 22 23 if ( empty( $excerpt ) ) { 18 24 return ''; 19 25 } … … 39 45 $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) ); 40 46 41 $content = '<p class="wp-block-post-excerpt__excerpt">' . get_the_excerpt( $block->context['postId'] );47 $content = '<p class="wp-block-post-excerpt__excerpt">' . $excerpt; 42 48 $show_more_on_new_line = ! isset( $attributes['showMoreOnNewLine'] ) || $attributes['showMoreOnNewLine']; 43 49 if ( $show_more_on_new_line && ! empty( $more_text ) ) {
Note: See TracChangeset
for help on using the changeset viewer.