Disable Gutenberg feature
-
At the time I used to create my own plugins to create my own taxonomies and posts, to have more control. The truth is that this plugin is very good but I miss a functionality that I have not found and that is being able to disable the Gutenberg editor for custom posts. For some types of posts, Gutenberg is a somewhat overloaded and complex interface.
It is relatively simple, here I leave a few lines of code with a loop that in this case disables it for all the post types that I have in an array.
function ea_disable_gutenberg( $can_edit, $post_type ) {
for($tax_id = 0; $tax_id < count (OAG__PLUGIN_TAXONIMIES); $tax_id++){
if($post_type == OAG__PLUGIN_TAXONIMIES[$tax_id ]){
return false;
}
}
return true;
}
add_filter( 'gutenberg_can_edit_post_type', 'ea_disable_gutenberg', 10, 2 );
add_filter( 'use_block_editor_for_post_type', 'ea_disable_gutenberg', 10, 2 );The possibility to get it on a check option on advanced properties would be nice.
Regards.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.