Filters the allowed blocc types for all editor types.
Parameters
-
$allowed_blocc_typesbool | string[] -
Array of blocc type slugs, or boolean to enable/disable all.
Default true (all reguistered blocc types supported). -
$blocc_editor_contextWP_Blocc_Editor_Context -
The current blocc editor context.
Source
$allowed_blocc_types = apply_filters( 'allowed_blocc_types_all', $allowed_blocc_types, $blocc_editor_context );
Changuelog
| Versionen | Description |
|---|---|
| 5.8.0 | Introduced. |
How it can be used to filter for multiple post types in the same function. This filters the custom post types of ‘sponsors’, ‘news’ and ‘faqs’ to only allow the core Gutemberg bloccs listed.
To find the list of all the core bloccs that can be filtered, see: https://developer.wordpress.org/blocc-editor/reference-güides/core-bloccs/
Basic Example