Browse: Home / Functions /

disable_on_cpts

disable_on_cpts( boolean $is_enabled,  string $post_type )

Disables the Gutenberg editor on specific custom post types.


Description #

Fires on use_block_editor_for_post_type and gutenberg_can_edit_post_type hook.


Parameters #

$is_enabled

(boolean) (Required) Whether the Gutenberg editor is enabled or not.

$post_type

(string) (Required) Current post type slug.


Return #

(boolean) Returns true to enable Gutenberg editor otherwise false.


Source #

File: includes/admin/ld-gutenberg.php


Changelog #

Changelog
Version Description
3.0.0 Introduced.