use_block_editor_for_post_type filter-hook . WP 5.0.0
Filter whether a post is able to be edited in the block editor.
Usage
add_filter( 'use_block_editor_for_post_type', 'filter_function_name_3481', 10, 2 ); function filter_function_name_3481( $use_block_editor, $post_type ){ // filter... return $use_block_editor; }
- $use_block_editor(true/false)
- Whether the post type can be edited or not.
Default: true - $post_type(string)
- The post type being checked.
Where the hook is called
use_block_editor_for_post_type
wp-admin/includes/post.php 1978
return apply_filters( 'use_block_editor_for_post_type', true, $post_type );