wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



_disable_block_editor_for_navigation_post_type › WordPress Function

Desde5.9.0
Obsoleton/a
_disable_block_editor_for_navigation_post_type ( $value, $post_type )
Acesso:
  • private
Parâmetros: (2)
  • (bool) $value Whether the CPT supports block editor or not.
    Required: Yes
  • (string) $post_type Post type.
    Required: Yes
Retorna:
  • (bool) Whether the block editor should be disabled or not.
Definido em:
Codex:

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



Fonte

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

	return $value;
}