mce_buttons_2 хук-фильтр . WP 2.0.0
Filters the second-row list of TinyMCE buttons (Visual tab).
Использование
add_filter( 'mce_buttons_2', 'filter_function_name_2930', 10, 2 ); function filter_function_name_2930( $mce_buttons_2, $editor_id ){ // filter... return $mce_buttons_2; }
- $mce_buttons_2(массив)
- Second-row list of buttons.
- $editor_id(строка)
- Unique editor identifier, e.g. 'content'. Accepts 'classic-block' when called from block editor's Classic block.
Список изменений
С версии 2.0.0 | Введена. |
С версии 3.3.0 | The $editor_id parameter was added. |
Где вызывается хук
mce_buttons_2
mce_buttons_2
wp-includes/class-wp-editor.php 698
$mce_buttons_2 = apply_filters( 'mce_buttons_2', $mce_buttons_2, $editor_id );
wp-includes/script-loader.php 468
$toolbar2 = apply_filters( 'mce_buttons_2', $toolbar2, 'classic-block' );