diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index bee68530eeb239..ab6bb52b6b3b2a 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -42,7 +42,7 @@ Create and save content to reuse across your site. Update the pattern, and the c - **Name:** core/block - **Category:** reusable - **Supports:** ~~customClassName~~, ~~html~~, ~~inserter~~, ~~renaming~~ -- **Attributes:** ref +- **Attributes:** overrides, ref ## Button diff --git a/packages/block-library/src/block/block.json b/packages/block-library/src/block/block.json index aeccdbfc1051db..b30c865e57a7f6 100644 --- a/packages/block-library/src/block/block.json +++ b/packages/block-library/src/block/block.json @@ -10,6 +10,9 @@ "attributes": { "ref": { "type": "number" + }, + "overrides": { + "type": "object" } }, "supports": { diff --git a/packages/block-library/src/block/index.php b/packages/block-library/src/block/index.php index fb80c64f1e3405..444001fa498595 100644 --- a/packages/block-library/src/block/index.php +++ b/packages/block-library/src/block/index.php @@ -83,28 +83,3 @@ function register_block_core_block() { ); } add_action( 'init', 'register_block_core_block' ); - -$gutenberg_experiments = get_option( 'gutenberg-experiments' ); -if ( $gutenberg_experiments && array_key_exists( 'gutenberg-pattern-partial-syncing', $gutenberg_experiments ) ) { - /** - * Registers the overrides attribute for core/block. - * - * @param array $args Array of arguments for registering a block type. - * @param string $block_name Block name including namespace. - * @return array $args - */ - function register_block_core_block_args( $args, $block_name ) { - if ( 'core/block' === $block_name ) { - $args['attributes'] = array_merge( - $args['attributes'], - array( - 'overrides' => array( - 'type' => 'object', - ), - ) - ); - } - return $args; - } - add_filter( 'register_block_type_args', 'register_block_core_block_args', 10, 2 ); -}