_disable_block_editor_for_navigation_post_type( bool $value, string $post_type ): bool

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

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

Parameters

$valueboolrequired
Whether the CPT supports block editor or not.
$post_typestringrequired
Post type.

Return

bool Whether the block editor should be disabled or not.

Source

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

	return $value;
}

Changelog

VersionDescription
5.9.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.