wp_enqueue_editor() WordPress Function

The wp_enqueue_editor() function is used to load the Javascript for the WordPress editor. This function should be called after the theme has been setup.

wp_enqueue_editor() #

Outputs the editor scripts, stylesheets, and default settings.


Description

The editor can be initialized when needed after page load. See wp.editor.initialize() in wp-admin/js/editor.js for initialization options.


Top ↑

Source

File: wp-includes/general-template.php

function wp_enqueue_editor() {
	if ( ! class_exists( '_WP_Editors', false ) ) {
		require ABSPATH . WPINC . '/class-wp-editor.php';
	}

	_WP_Editors::enqueue_default_editor();
}


Top ↑

Changelog

Changelog
VersionDescription
4.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More