Browse: Home / Functions /


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 #


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


(string) (Required) Current post type slug.

Return #

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

Source #

File: includes/admin/ld-gutenberg.php

Changelog #

Version Description
3.0.0 Introduced.