wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



_disable_block_editor_for_navigation_post_type › WordPress Function

Depuis5.9.0
Dépréciéen/a
_disable_block_editor_for_navigation_post_type ( $value, $post_type )
Accès:
  • private
Paramètres: (2)
  • (bool) $value Whether the CPT supports block editor or not.
    Requis: Oui
  • (string) $post_type Post type.
    Requis: Oui
Retourne:
  • (bool) Whether the block editor should be disabled or not.
Défini(e) dans:
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;
}