wpseek.com
WordPress开发者和主题制作者的搜索引擎



_disable_block_editor_for_navigation_post_type › WordPress Function

Since5.9.0
已弃用n/a
_disable_block_editor_for_navigation_post_type ( $value, $post_type )
访问:
  • private
参数: (2)
  • (bool) $value Whether the CPT supports block editor or not.
    Required: Yes
  • (string) $post_type Post type.
    Required: Yes
返回:
  • (bool) Whether the block editor should be disabled or not.
定义在:
文档:

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



源码

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

	return $value;
}