Make WordPress Core


Ignore:
Timestamp:
11/27/2023 08:18:39 PM (3 years ago)
Author:
johnbillion
Message:

Docs: Correct the documented type for the block_hooks argument when registering a block type.

This argument is an associative array of strings, not an array of arrays.

See #59313, 59651

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-block-type.php

    r57068 r57140  
    182182         *
    183183         * @since 6.4.0
    184          * @var array[]
     184         * @var string[]
    185185         */
    186186        public $block_hooks = array();
     
    300300         *     @type string[]      $uses_context             Context values inherited by blocks of this type.
    301301         *     @type string[]|null $provides_context         Context provided by blocks of this type.
    302          *     @type array[]       $block_hooks              Block hooks.
     302         *     @type string[]      $block_hooks              Block hooks.
    303303         *     @type string[]      $editor_script_handles    Block type editor only script handles.
    304304         *     @type string[]      $script_handles           Block type front end and editor script handles.
Note: See TracChangeset for help on using the changeset viewer.