diff --git a/lib/block-supports/pattern.php b/lib/block-supports/pattern.php index ee0436afc05fc2..a783135c793e3f 100644 --- a/lib/block-supports/pattern.php +++ b/lib/block-supports/pattern.php @@ -20,8 +20,8 @@ function gutenberg_register_pattern_support( $block_type ) { $block_type->uses_context = array(); } - if ( ! in_array( 'overrides', $block_type->uses_context, true ) ) { - $block_type->uses_context[] = 'overrides'; + if ( ! in_array( 'pattern/overrides', $block_type->uses_context, true ) ) { + $block_type->uses_context[] = 'pattern/overrides'; } } } diff --git a/lib/experimental/connection-sources/index.php b/lib/experimental/connection-sources/index.php index 435f97142f31ac..bf89ba177b6e94 100644 --- a/lib/experimental/connection-sources/index.php +++ b/lib/experimental/connection-sources/index.php @@ -14,6 +14,6 @@ }, 'pattern_attributes' => function ( $block_instance ) { $block_id = $block_instance->attributes['metadata']['id']; - return _wp_array_get( $block_instance->context, array( 'overrides', $block_id ), false ); + return _wp_array_get( $block_instance->context, array( 'pattern/overrides', $block_id ), false ); }, ); diff --git a/packages/block-library/src/block/index.php b/packages/block-library/src/block/index.php index 265e0ac75e267c..36783043d12171 100644 --- a/packages/block-library/src/block/index.php +++ b/packages/block-library/src/block/index.php @@ -52,13 +52,13 @@ function render_block_core_block( $attributes ) { && isset( $attributes['overrides'] ); /** - * We set the `overrides` context through the `render_block_context` + * We set the `pattern/overrides` context through the `render_block_context` * filter so that it is available when a pattern's inner blocks are * rendering via do_blocks given it only receives the inner content. */ if ( $has_partial_synced_overrides ) { $filter_block_context = static function ( $context ) use ( $attributes ) { - $context['overrides'] = $attributes['overrides']; + $context['pattern/overrides'] = $attributes['overrides']; return $context; }; add_filter( 'render_block_context', $filter_block_context, 1 );