_disable_block_editor_for_navigation_post_type()WP 5.9.0

Disables block editor for wp_navigation type posts so they can be managed via the UI.

Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.

No Hooks.

Return

true|false. Whether the block editor should be disabled or not.

Usage

_disable_block_editor_for_navigation_post_type( $value, $post_type );
$value(true|false) (required)
Whether the CPT supports block editor or not.
$post_type(string) (required)
Post type.

Changelog

Since 5.9.0 Introduced.

_disable_block_editor_for_navigation_post_type() code WP 6.5.2

function _disable_block_editor_for_navigation_post_type( $value, $post_type ) {
	if ( 'wp_navigation' === $post_type ) {
		return false;
	}

	return $value;
}