Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add allowed_blocks to WP_Block_Type
  • Loading branch information
jsnajdr committed Feb 1, 2024
commit 5ad4782b7c4e44f41bcc1e4dba350a23e4953960
9 changes: 9 additions & 0 deletions src/wp-includes/class-wp-block-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ class WP_Block_Type {
*/
public $ancestor = null;

/**
* Limits which block types can be inserted as children of this block type.
*
* @since 6.5.0
* @var string[]|null
*/
public allowed_blocks = null;

/**
* Block type icon.
*
Expand Down Expand Up @@ -303,6 +311,7 @@ class WP_Block_Type {
* available when nested within the specified blocks.
* @type string[]|null $ancestor Setting ancestor makes a block available only inside the specified
* block types at any position of the ancestor's block subtree.
* @type string[]|null $allowed_blocks Limits which block types can be inserted as children of this block type.
* @type string|null $icon Block type icon.
* @type string $description A detailed block type description.
* @type string[] $keywords Additional keywords to produce block type as
Expand Down