_WP_Editors::enqueue_default_editor()public staticWP 4.8.0

Enqueue all editor scripts. For use when the editor is going to be initialized after page load.

Метод класса: _WP_Editors{}

Хуков нет.

Возвращает

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

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

$result = _WP_Editors::enqueue_default_editor();

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

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

Код _WP_Editors::enqueue_default_editor() WP 6.4.3

public static function enqueue_default_editor() {
	// We are past the point where scripts can be enqueued properly.
	if ( did_action( 'wp_enqueue_editor' ) ) {
		return;
	}

	self::enqueue_scripts( true );

	// Also add wp-includes/css/editor.css.
	wp_enqueue_style( 'editor-buttons' );

	if ( is_admin() ) {
		add_action( 'admin_print_footer_scripts', array( __CLASS__, 'force_uncompressed_tinymce' ), 1 );
		add_action( 'admin_print_footer_scripts', array( __CLASS__, 'print_default_editor_scripts' ), 45 );
	} else {
		add_action( 'wp_print_footer_scripts', array( __CLASS__, 'force_uncompressed_tinymce' ), 1 );
		add_action( 'wp_print_footer_scripts', array( __CLASS__, 'print_default_editor_scripts' ), 45 );
	}
}