_enable_content_editor_for_navigation_post_type()WP 5.9.0

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.

Внутренняя функция — эта функция рассчитана на использование самим ядром. Не рекомендуется использовать эту функцию в своем коде.

Хуков нет.

Возвращает

null. Ничего (null).

Использование

_enable_content_editor_for_navigation_post_type( $post );
$post(WP_Post) (обязательный)
An instance of WP_Post class.

Заметки

Список изменений

С версии 5.9.0 Введена.

Код _enable_content_editor_for_navigation_post_type() WP 6.5.2

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' );
}