Filter hook 'teeny_mce_buttons'

in WP Core File wp-includes/class-wp-editor.php at line 638

View Source

teeny_mce_buttons

Filter Hook
Description
Filters the list of teenyMCE buttons (Code tab).

Hook Information

File Location wp-includes/class-wp-editor.php View on GitHub
Hook Type Filter
Line Number 638

Hook Parameters

Type Name Description
array $mce_buttons An array of teenyMCE buttons.
string $editor_id Unique editor identifier, e.g. 'content'.

Usage Examples

Basic Usage
<?php
// Hook into teeny_mce_buttons
add_filter('teeny_mce_buttons', 'my_custom_filter', 10, 2);

function my_custom_filter($mce_buttons, $editor_id) {
    // Your custom filtering logic here
    return $mce_buttons;
}

Source Code Context

wp-includes/class-wp-editor.php:638 - How this hook is used in WordPress core
<?php
 633  				 * @since 3.3.0 The `$editor_id` parameter was added.
 634  				 *
 635  				 * @param array  $mce_buttons An array of teenyMCE buttons.
 636  				 * @param string $editor_id   Unique editor identifier, e.g. 'content'.
 637  				 */
 638  				$mce_buttons   = apply_filters( 'teeny_mce_buttons', $mce_buttons, $editor_id );
 639  				$mce_buttons_2 = array();
 640  				$mce_buttons_3 = array();
 641  				$mce_buttons_4 = array();
 642  			} else {
 643  				$mce_buttons = array(

PHP Documentation

<?php
/**
				 * Filters the list of teenyMCE buttons (Code tab).
				 *
				 * @since 2.7.0
				 * @since 3.3.0 The `$editor_id` parameter was added.
				 *
				 * @param array  $mce_buttons An array of teenyMCE buttons.
				 * @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.