wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



_disable_block_editor_for_navigation_post_type › WordPress Function

Seit5.9.0
Veraltetn/v
_disable_block_editor_for_navigation_post_type ( $value, $post_type )
Zugriff:
  • private
Parameter: (2)
  • (bool) $value Whether the CPT supports block editor or not.
    Erforderlich: Ja
  • (string) $post_type Post type.
    Erforderlich: Ja
Gibt zurück:
  • (bool) Whether the block editor should be disabled or not.
Definiert in:
Codex:

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



Quellcode

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

	return $value;
}