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 $mce_init 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( $mce_init, $editor_id ){ // filter... return $mce_init; }
- $mce_init(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 804
$mce_init = apply_filters( 'teeny_mce_before_init', $mce_init, $editor_id );
Where the hook is used in WordPress
wp-includes/default-filters.php 299
add_filter( 'teeny_mce_before_init', '_mce_set_direction' );