mce_buttons
Filter HookDescription
Adds inline scripts required for the TinyMCE in the block editor. These TinyMCE init settings are used to extend and override the default settings from `_WP_Editors::default_settings()` for the Classic block.Hook Information
File Location |
wp-includes/script-loader.php
View on GitHub
|
Hook Type | Filter |
Line Number | 573 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into mce_buttons
add_filter('mce_buttons', 'my_custom_filter');
function my_custom_filter() {
// Your custom filtering logic here
return 'modified_value';
}
Source Code Context
wp-includes/script-loader.php:573
- How this hook is used in WordPress core
<?php
568 'wp_add_media',
569 'wp_adv',
570 );
571
572 /** This filter is documented in wp-includes/class-wp-editor.php */
573 $toolbar1 = apply_filters( 'mce_buttons', $toolbar1, 'classic-block' );
574
575 $toolbar2 = array(
576 'strikethrough',
577 'hr',
578 'forecolor',
PHP Documentation
<?php
/**
* Adds inline scripts required for the TinyMCE in the block editor.
*
* These TinyMCE init settings are used to extend and override the default settings
* from `_WP_Editors::default_settings()` for the Classic block.
*
* @since 5.0.0
*
* @global WP_Scripts $wp_scripts
*/
Quick Info
- Hook Type: Filter
- Parameters: 0
- File: wp-includes/script-loader.php
Related Hooks
Related hooks will be displayed here in future updates.