teeny_mce_before_init
Filter HookDescription
Filters the teenyMCE config before init.Hook Information
File Location |
wp-includes/class-wp-editor.php
View on GitHub
|
Hook Type | Filter |
Line Number | 804 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$mce_init
|
An array with teenyMCE config. |
string
|
$editor_id
|
Unique editor identifier, e.g. 'content'. |
Usage Examples
Basic Usage
<?php
// Hook into teeny_mce_before_init
add_filter('teeny_mce_before_init', 'my_custom_filter', 10, 2);
function my_custom_filter($mce_init, $editor_id) {
// Your custom filtering logic here
return $mce_init;
}
Source Code Context
wp-includes/class-wp-editor.php:804
- How this hook is used in WordPress core
<?php
799 * @since 3.3.0 The `$editor_id` parameter was added.
800 *
801 * @param array $mce_init An array with teenyMCE config.
802 * @param string $editor_id Unique editor identifier, e.g. 'content'.
803 */
804 $mce_init = apply_filters( 'teeny_mce_before_init', $mce_init, $editor_id );
805 } else {
806
807 /**
808 * Filters the TinyMCE config before init.
809 *
PHP Documentation
<?php
/**
* Filters the teenyMCE config before init.
*
* @since 2.7.0
* @since 3.3.0 The `$editor_id` parameter was added.
*
* @param array $mce_init An array with teenyMCE config.
* @param string $editor_id Unique editor identifier, e.g. 'content'.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/class-wp-editor.php
Related Hooks
Related hooks will be displayed here in future updates.