Make WordPress Core


Ignore:
Timestamp:
01/29/2024 09:04:18 PM (10 months ago)
Author:
youknowriad
Message:

Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.

This patch, somewhat small brings a lot to WordPress.
This includes features like:

  • DataViews.
  • Customization tools like box shadow, background size and repeat.
  • UI improvements in the site editor.
  • Preferences sharing between the post and site editors.
  • Unified panels and editors between post and site editors.
  • Improved template mode in the post editor.
  • Iterations to multiple interactive blocks.
  • Preparing the blocks and UI for pattern overrides.
  • and a lot more.

Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.

File:
1 edited

Legend:

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

    r56849 r57377  
    2828 */
    2929function render_block_core_pattern( $attributes ) {
     30    static $seen_refs = array();
     31
    3032    if ( empty( $attributes['slug'] ) ) {
    3133        return '';
     
    3739    if ( ! $registry->is_registered( $slug ) ) {
    3840        return '';
     41    }
     42
     43    if ( isset( $seen_refs[ $attributes['slug'] ] ) ) {
     44        // WP_DEBUG_DISPLAY must only be honored when WP_DEBUG. This precedent
     45        // is set in `wp_debug_mode()`.
     46        $is_debug = WP_DEBUG && WP_DEBUG_DISPLAY;
     47
     48        return $is_debug ?
     49            // translators: Visible only in the front end, this warning takes the place of a faulty block. %s represents a pattern's slug.
     50            sprintf( __( '[block rendering halted for pattern "%s"]' ), $slug ) :
     51            '';
    3952    }
    4053
     
    4962    }
    5063
    51     return do_blocks( $content );
     64    $seen_refs[ $attributes['slug'] ] = true;
     65
     66    $content = do_blocks( $content );
     67
     68    global $wp_embed;
     69    $content = $wp_embed->autoembed( $content );
     70
     71    unset( $seen_refs[ $attributes['slug'] ] );
     72    return $content;
    5273}
    5374
Note: See TracChangeset for help on using the changeset viewer.