Skip to content

Commit

Permalink
Docs: Correct the documented type for the block_hooks argument when…
Browse files Browse the repository at this point in the history
… registering a block type.

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

See #59313, 59651


git-svn-id: https://develop.svn.wordpress.org/trunk@57140 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
johnbillion committed Nov 27, 2023
1 parent 6a891c7 commit 5f2f5f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wp-includes/class-wp-block-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class WP_Block_Type {
* next to the "anchor" block whenever the latter is encountered.
*
* @since 6.4.0
* @var array[]
* @var string[]
*/
public $block_hooks = array();

Expand Down Expand Up @@ -299,7 +299,7 @@ class WP_Block_Type {
* @type array|null $attributes Block type attributes property schemas.
* @type string[] $uses_context Context values inherited by blocks of this type.
* @type string[]|null $provides_context Context provided by blocks of this type.
* @type array[] $block_hooks Block hooks.
* @type string[] $block_hooks Block hooks.
* @type string[] $editor_script_handles Block type editor only script handles.
* @type string[] $script_handles Block type front end and editor script handles.
* @type string[] $view_script_handles Block type front end only script handles.
Expand Down

0 comments on commit 5f2f5f6

Please sign in to comment.