Make WordPress Core


Ignore:
Timestamp:
01/29/2024 09:04:18 PM (17 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/template-part.php

    r56849 r57377  
    4444            // A published post might already exist if this template part was customized elsewhere
    4545            // or if it's part of a customized template.
    46             $content    = $template_part_post->post_content;
    47             $area_terms = get_the_terms( $template_part_post, 'wp_template_part_area' );
    48             if ( ! is_wp_error( $area_terms ) && false !== $area_terms ) {
    49                 $area = $area_terms[0]->name;
     46            $block_template = _build_block_template_result_from_post( $template_part_post );
     47            $content        = $block_template->content;
     48            if ( isset( $block_template->area ) ) {
     49                $area = $block_template->area;
    5050            }
    5151            /**
     
    7070                if ( isset( $block_template->area ) ) {
    7171                    $area = $block_template->area;
     72                }
     73
     74                // Needed for the `render_block_core_template_part_file` and `render_block_core_template_part_none` actions below.
     75                $block_template_file = _get_block_template_file( 'wp_template_part', $attributes['slug'] );
     76                if ( $block_template_file ) {
     77                    $template_part_file_path = $block_template_file['path'];
    7278                }
    7379            }
     
    276282        __DIR__ . '/template-part',
    277283        array(
    278             'render_callback' => 'render_block_core_template_part',
    279             'variations'      => build_template_part_block_variations(),
     284            'render_callback'    => 'render_block_core_template_part',
     285            'variation_callback' => 'build_template_part_block_variations',
    280286        )
    281287    );
Note: See TracChangeset for help on using the changeset viewer.