Title: TinyMCE button to be optional
Last modified: June 16, 2022

---

# TinyMCE button to be optional

 *  Resolved [kamyarhu](https://wordpress.org/support/users/kamyarhu/)
 * (@kamyarhu)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/tinymce-button-to-be-optional/)
 * With the recent update you have added a button to tinymce for adding snippets.
   While this is a great function, it opens possibility for many mistakes by editors.
   I usually hide snippets even from other admins. Can you please make this optional
   from the settings page?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/tinymce-button-to-be-optional/#post-15744874)
 * It’s only accessible to users who can control the code snippets interface. By
   default, this is anyone who has the `manage_options` capability (administrators),
   but if you want to restrict it down further you can do so with the `code_snippets_cap`
   filter.
 *  Thread Starter [kamyarhu](https://wordpress.org/support/users/kamyarhu/)
 * (@kamyarhu)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/tinymce-button-to-be-optional/#post-15765039)
 * Thank you Shea
 * This piece of code helped me to remove it completely, as I do not use the function.
 *     ```
       // Remove Code Snippet Button from TinyMCE
       add_filter('mce_buttons', 'remove_snippet_button', 2000);
       function remove_snippet_button( $buttons ) {
         $remove = array('code_snippets');
         return array_diff( $buttons, $remove );
       }
       ```
   
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/tinymce-button-to-be-optional/#post-15766202)
 * Absolutely, that will also work. Great solution.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘TinyMCE button to be optional’ is closed to new replies.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/tinymce-button-to-be-optional/#post-15766202)
 * Status: resolved