• Resolved kamyarhu

    (@kamyarhu)


    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

    (@bungeshea)

    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

    (@kamyarhu)

    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

    (@bungeshea)

    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.