wp_enqueue_editor
Action HookDescription
Fires when scripts and styles are enqueued for the editor.Hook Information
File Location |
wp-includes/class-wp-editor.php
View on GitHub
|
Hook Type | Action |
Line Number | 893 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$to_load
|
An array containing boolean values whether TinyMCE and Quicktags are being loaded. |
Usage Examples
Basic Usage
<?php
// Hook into wp_enqueue_editor
add_action('wp_enqueue_editor', 'my_custom_function', 10, 1);
function my_custom_function($to_load) {
// Your custom code here
}
Source Code Context
wp-includes/class-wp-editor.php:893
- How this hook is used in WordPress core
<?php
888 * @since 3.9.0
889 *
890 * @param array $to_load An array containing boolean values whether TinyMCE
891 * and Quicktags are being loaded.
892 */
893 do_action(
894 'wp_enqueue_editor',
895 array(
896 'tinymce' => ( $default_scripts || self::$has_tinymce ),
897 'quicktags' => ( $default_scripts || self::$has_quicktags ),
898 )
PHP Documentation
<?php
/**
* Fires when scripts and styles are enqueued for the editor.
*
* @since 3.9.0
*
* @param array $to_load An array containing boolean values whether TinyMCE
* and Quicktags are being loaded.
*/
Quick Info
- Hook Type: Action
- Parameters: 1
- File: wp-includes/class-wp-editor.php
Related Hooks
Related hooks will be displayed here in future updates.