Make WordPress Core


Ignore:
Timestamp:
09/14/2023 01:23:13 PM (5 months ago)
Author:
Bernhard Reiter
Message:

General: Add block_hooks field to block type registration, REST API.

In order to implement Block Hooks, we need to add a new block_hooks field to the WP_Block_Type class, as well as to block registration related functions, the block types REST API controller, etc.

Props gziolo.
Fixes #59346. See #59313.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/post.php

    r56176 r56587  
    22082208 * @since 5.0.0
    22092209 * @since 6.3.0 Added `selectors` field.
     2210 * @since 6.4.0 Added `block_hooks` field.
    22102211 *
    22112212 * @return array An associative array of registered block data.
     
    22222223        'provides_context' => 'providesContext',
    22232224        'uses_context'     => 'usesContext',
     2225        'block_hooks'      => 'blockHooks',
    22242226        'selectors'        => 'selectors',
    22252227        'supports'         => 'supports',
Note: See TracChangeset for help on using the changeset viewer.