_WP_Editors::enqueue_default_editor() WordPress Method
The _WP_Editors::enqueue_default_editor() method is used to enqueue the default editor for a given post type. This method is called by the `_WP_Editors::enqueue_editor()` method, and both are called by the `wp_enqueue_editor()` function.
_WP_Editors::enqueue_default_editor() #
Enqueue all editor scripts.
Description
For use when the editor is going to be initialized after page load.
Source
File: wp-includes/class-wp-editor.php
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 ); } }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.8.0 | Introduced. |