WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 117 | /** |
| 118 | * Filters the allowed block types for all editor types. |
| 119 | * |
| 120 | * @since 5.8.0 |
| 121 | * |
| 122 | * @param bool|string[] $allowed_block_types Array of block type slugs, or boolean to enable/disable all. |
| 123 | * Default true (all registered block types supported). |
| 124 | * @param WP_Block_Editor_Context $block_editor_context The current block editor context. |
| 125 | */ |
| 126 | $allowed_block_types = apply_filters( 'allowed_block_types_all', $allowed_block_types, $block_editor_context ); |
| 127 | |
| 128 | if ( ! empty( $block_editor_context->post ) ) { |
| 129 | $post = $block_editor_context->post; |
| 130 | |
| 131 | /** |
| 132 | * Filters the allowed block types for the editor. |
| 133 | * |
| 134 | * @since 5.0.0 |
| 135 | * @deprecated 5.8.0 Use the {@see 'allowed_block_types_all'} filter instead. |