wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



_disable_block_editor_for_navigation_post_type › WordPress Function

Da5.9.0
Deprecaton/a
_disable_block_editor_for_navigation_post_type ( $value, $post_type )
Accedi:
  • private
Parametri: (2)
  • (bool) $value Whether the CPT supports block editor or not.
    Richiesto:
  • (string) $post_type Post type.
    Richiesto:
Ritorna:
  • (bool) Whether the block editor should be disabled or not.
Definito a:
Codex:

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



Sorgenti

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

	return $value;
}