Filters whether a post is able to be edited in the block editor.
Parameters
$use_block_editor
bool- Whether the post can be edited or not.
$post
WP_Post- The post being checked.
Source
return apply_filters( 'use_block_editor_for_post', $use_block_editor, $post );
Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |
To disable the block editor for all post types, use the following filter:
Add the above line to your active theme or child theme’s functions.php file.
Disable Gutenberg for certain post type