wp_editor_settings
Filters the wp_editor() settings.
Usage
add_filter( 'wp_editor_settings', 'wp_kama_editor_settings_filter', 10, 2 ); /** * Function for `wp_editor_settings` filter-hook. * * @param array $settings Array of editor arguments. * @param string $editor_id Unique editor identifier, e.g. 'content'. Accepts 'classic-block' when called from block editor's Classic block. * * @return array */ function wp_kama_editor_settings_filter( $settings, $editor_id ){ // filter... return $settings; }
- $settings(array)
- Array of editor arguments.
- $editor_id(string)
- Unique editor identifier, e.g. 'content'. Accepts 'classic-block' when called from block editor's Classic block.
Changelog
Since 4.0.0 | Introduced. |
Where the hook is called
wp_editor_settings
wp_editor_settings
wp-includes/class-wp-editor.php 83
$settings = apply_filters( 'wp_editor_settings', $settings, $editor_id );
wp-includes/script-loader.php 523
$editor_settings = apply_filters( 'wp_editor_settings', array( 'tinymce' => true ), 'classic-block' );