Make WordPress Core


Ignore:
Timestamp:
11/06/2023 02:45:28 PM (20 months ago)
Author:
Bernhard Reiter
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/includesPost.php

    r56943 r57068  
    936936                'icon'        => 'text',
    937937                'attributes'  => array(
    938                     'lock' => array( 'type' => 'object' ),
     938                    'lock'     => array( 'type' => 'object' ),
     939                    'metadata' => array( 'type' => 'object' ),
    939940                ),
    940941                'usesContext' => array(),
Note: See TracChangeset for help on using the changeset viewer.