Make WordPress Core


Ignore:
Timestamp:
11/08/2021 02:26:27 PM (3 years ago)
Author:
youknowriad
Message:

Block Editor: Update the WordPress Packages based on Gutenberg 11.9 RC1.

This brings the JS packages up to date and is the first step that will allow us
to include the other block editor updates for WordPress 5.9:
FSE infrastrucutre, site editor and global styles.

Props noisysocks.
See #54337.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/post-excerpt.php

    r51443 r52042  
    1616function render_block_core_post_excerpt( $attributes, $content, $block ) {
    1717    if ( ! isset( $block->context['postId'] ) ) {
     18        return '';
     19    }
     20
     21    $excerpt = get_the_excerpt( $block->context['postId'] );
     22
     23    if ( empty( $excerpt ) ) {
    1824        return '';
    1925    }
     
    3945    $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
    4046
    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;
    4248    $show_more_on_new_line = ! isset( $attributes['showMoreOnNewLine'] ) || $attributes['showMoreOnNewLine'];
    4349    if ( $show_more_on_new_line && ! empty( $more_text ) ) {
Note: See TracChangeset for help on using the changeset viewer.