Title: teeny_mce_buttons
Published: April 25, 2014
Last modified: August 20, 2026

---

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

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/teeny_mce_buttons/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/teeny_mce_buttons/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/teeny_mce_buttons/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/teeny_mce_buttons/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/hooks/teeny_mce_buttons/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/hooks/teeny_mce_buttons/?output_format=md#wp--skip-link--target)

Filters the list of teenyMCE buttons (Code tab).

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/teeny_mce_buttons/?output_format=md#parameters)󠁿

 `$mce_buttons`array

An array of teenyMCE buttons.

`$editor_id`string

Unique editor identifier, e.g. `'content'`.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/teeny_mce_buttons/?output_format=md#source)󠁿

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

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-editor.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/class-wp-editor.php#L638)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/class-wp-editor.php#L638-L638)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/teeny_mce_buttons/?output_format=md#related)󠁿

| Used by | Description | 
| [_WP_Editors::editor_settings()](https://developer.wordpress.org/reference/classes/_wp_editors/editor_settings/)`wp-includes/class-wp-editor.php` |  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/teeny_mce_buttons/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.3.0](https://developer.wordpress.org/reference/since/3.3.0/) | The `$editor_id` parameter was added. | 
| [2.7.0](https://developer.wordpress.org/reference/since/2.7.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/hooks/teeny_mce_buttons/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/hooks/teeny_mce_buttons/?output_format=md#comment-content-3022)
 2.   [Mahdi Yazdani](https://profiles.wordpress.org/mahdiyazdani/)  [  8 years ago  ](https://developer.wordpress.org/reference/hooks/teeny_mce_buttons/#comment-3022)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fteeny_mce_buttons%2F%23comment-3022)
    Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fteeny_mce_buttons%2F%23comment-3022)
 4.     ```php
        /**
         * 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 );
        ```
    
 5.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fteeny_mce_buttons%2F%3Freplytocom%3D3022%23feedback-editor-3022)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fteeny_mce_buttons%2F)
before being able to contribute a note or feedback.