teeny_mce_before_init
Filters the teenyMCE config before init.
Usage
add_filter( 'teeny_mce_before_init', 'wp_kama_teeny_mce_before_init_filter', 10, 2 ); /** * Function for `teeny_mce_before_init` filter-hook. * * @param array $mceInit An array with teenyMCE config. * @param string $editor_id Unique editor identifier, e.g. 'content'. * * @return array */ function wp_kama_teeny_mce_before_init_filter( $mceInit, $editor_id ){ // filter... return $mceInit; }
- $mceInit(array)
- An array with teenyMCE config.
- $editor_id(string)
- Unique editor identifier, e.g. 'content'.
Changelog
Since 2.7.0 | Introduced. |
Since 3.3.0 | The $editor_id parameter was added. |
Where the hook is called
teeny_mce_before_init
wp-includes/class-wp-editor.php 794
$mceInit = apply_filters( 'teeny_mce_before_init', $mceInit, $editor_id );
Where the hook is used in WordPress
wp-includes/default-filters.php 286
add_filter( 'teeny_mce_before_init', '_mce_set_direction' );