apply_filters( ‘teeny_mce_buttons’, array $mce_buttons, string $editor_id )

Filters the list of teenyMCE buttons (Text tab).

Parameters

$mce_buttonsarray
An array of teenyMCE buttons.
$editor_idstring
Unique editor identifier, e.g. 'content'.

Source

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

Changelog

VersionDescription
3.3.0The $editor_id parameter was added.
2.7.0Introduced.

User Contributed Notes

  1. Skip to note 2 content
    /**
     * 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.