WPDev.one
Core Function
View Source on Trac ↗

get_allowed_block_types()

get_allowed_block_types( mixed $block_editor_context )

Gets the list of allowed block types to use in the block editor.

Parameters 1 required

Name / Type Description
$block_editor_context
WP_Block_Editor_Context

The current block editor context.

Required

Return Value

((bool)
| string[]) Array of block type slugs, or boolean to enable/disable all.

Function Information

Since Version
5.8.0
Source File
wp-includes/block-editor.php
Advertisement