wp_enqueue_editor
Fires when scripts and styles are enqueued for the editor.
Использование
add_action( 'wp_enqueue_editor', 'wp_kama_enqueue_editor_action' );
/**
* Function for `wp_enqueue_editor` action-hook.
*
* @param array $to_load An array containing boolean values whether TinyMCE and Quicktags are being loaded.
*
* @return void
*/
function wp_kama_enqueue_editor_action( $to_load ){
// action...
}
- $to_load(массив)
- An array containing boolean values whether TinyMCE and Quicktags are being loaded.
Список изменений
| С версии 3.9.0 | Введена. |
Где вызывается хук
wp_enqueue_editor
wp-includes/class-wp-editor.php 893-899
do_action( 'wp_enqueue_editor', array( 'tinymce' => ( $default_scripts || self::$has_tinymce ), 'quicktags' => ( $default_scripts || self::$has_quicktags ), ) );