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



_enable_content_editor_for_navigation_post_type › WordPress Function

Seit5.9.0
Veraltetn/v
_enable_content_editor_for_navigation_post_type ( $post )
Zugriff:
  • private
Parameter:
  • (WP_Post) $post An instance of WP_Post class.
    Erforderlich: Ja
Siehe:
Definiert in:
Codex:

This callback enables content editor for wp_navigation type posts.

We need to enable it back because we disable it to hide the content editor for wp_navigation type posts.


Quellcode

function _enable_content_editor_for_navigation_post_type( $post ) {
	$post_type = get_post_type( $post );
	if ( 'wp_navigation' !== $post_type ) {
		return;
	}

	add_post_type_support( $post_type, 'editor' );
}