• Resolved streamworksaudio

    (@streamworksaudio)


    I am using ACF to show a WYSIWYG (MCE) field on the front end of our site, I am using the mce_buttons filter to limit what is shown to only 4 buttons. However since updating Code Snippets to 3.0.1 there are now buttons to insert code snippets. Is there any way to not have these buttons show in the MCE editor?

    This is something we do not want to show to front end users.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter streamworksaudio

    (@streamworksaudio)

    A couple minutes after posting this, I see that the Code Snippets button in the MCE editor only shows for administrators, so this works.

    Plugin Author Shea Bunge

    (@bungeshea)

    Absolutely, the plugin checks whether the use has the necessary capability to access the snippets interface before the button is added.

    You can change which capability this is (by default it is manage_options) through the code_snippets_cap filter.

    Additionally, if your mce_buttons filter hook is set to a higher priority than the default of 10, you can hide the code snippets button along with the other ones you are removing. The key it uses is code_snippets.

    • This reply was modified 2 years, 6 months ago by Shea Bunge. Reason: Add mce_buttons filter information
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove Code Snippet Buttons from the MCE Editor’ is closed to new replies.