mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Block Types: Add metadata
global attribute.
Add a new global attribute (i.e. an attribute that can be added to all and any blocks) called `metadata`. This is required for use cases such as allowing the user to assign custom names to blocks, or for making Block Hooks work with user-modified templates/parts/patterns (#59646). Props Mamaduka, gziolo, get_dave. Fixes #59797. Built from https://develop.svn.wordpress.org/trunk@57068 git-svn-id: http://core.svn.wordpress.org/trunk@56579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ea9d0c8dce
commit
388713f0ff
@ -242,11 +242,13 @@ class WP_Block_Type {
|
||||
/**
|
||||
* Attributes supported by every block.
|
||||
*
|
||||
* @since 6.0.0
|
||||
* @since 6.0.0 Added `lock`.
|
||||
* @since 6.5.0 Added `metadata`.
|
||||
* @var array
|
||||
*/
|
||||
const GLOBAL_ATTRIBUTES = array(
|
||||
'lock' => array( 'type' => 'object' ),
|
||||
'lock' => array( 'type' => 'object' ),
|
||||
'metadata' => array( 'type' => 'object' ),
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.5-alpha-57067';
|
||||
$wp_version = '6.5-alpha-57068';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user