apply_filters( 'teeny_mce_buttons', array $mce_buttons, string $editor_id )

Filters the list of teenyMCE buttons (Text tab).


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

Top ↑


File: wp-includes/class-wp-editor.php. View all references

$mce_buttons   = apply_filters( 'teeny_mce_buttons', $mce_buttons, $editor_id );

Top ↑


Version Description
3.3.0 The $editor_id parameter was added.
2.7.0 Introduced.

Top ↑

User Contributed Notes

  1. Skip to note 1 content
    Contributed by Mahdi Yazdani
     * The following snippet shows you how to limit the toolbar buttons to the 
     * text format dropdown, and the bold and italic buttons. 
     * @access   public
     * @param    $buttons        An array of teenyMCE buttons.
     * @param    $editor_id      Unique editor identifier, e.g. 'content'.
     * @return   array           List of teenyMCE buttons
    function prefix_custom_teeny_mce_buttons( $buttons, $editor_id ) {
        $buttons = array( 'formatselect', 'bold', 'italic' );
        return $buttons;
    add_filter( 'teeny_mce_buttons', 'prefix_custom_teeny_mce_buttons', 10, 2 );

You must log in before being able to contribute a note or feedback.