wpseek.com
A WordPress-centric search engine for devs and theme authors



_disable_block_editor_for_navigation_post_type › WordPress Function

Since5.9.0
Deprecatedn/a
_disable_block_editor_for_navigation_post_type ( $value, $post_type )
Access:
  • private
Parameters: (2)
  • (bool) $value Whether the CPT supports block editor or not.
    Required: Yes
  • (string) $post_type Post type.
    Required: Yes
Returns:
  • (bool)
Defined at:
Codex:

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



Source

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

	return $value;
}