Title: Hide &#8220;Insert snippets source&#8221; Button from Content Editor
Last modified: August 26, 2023

---

# Hide “Insert snippets source” Button from Content Editor

 *  Resolved [indrabhusanroy](https://wordpress.org/support/users/indrabhusanroy/)
 * (@indrabhusanroy)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/hide-insert-snippets-source-button-from-content-editor/)
 * Is there way to hide “Insert snippets source” Button from wordpress content editor
   and Tutor Lms mce editor–Basically from every content editor.
 * Regards

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

 *  [Yordan Soares](https://wordpress.org/support/users/yordansoares/)
 * (@yordansoares)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/hide-insert-snippets-source-button-from-content-editor/#post-17069841)
 * Hi [@indrabhusanroy](https://wordpress.org/support/users/indrabhusanroy/),
 * Try activating this code snippet in your site to hide the plugin tools from the
   TinyMCE editor:
 *     ```wp-block-code
       /**
        * Code Snippets:
        * Remove the plugin tools from the TinyMCE editor
        */ 
       remove_class_hook( 'init', 'Code_Snippets\Frontend', 'setup_mce_plugin' );
   
       /**
        * Helper function for accessing action hooks added by methods within a class
        */
       function remove_class_hook( $tag, $class_name = '', $method_name = '', $priority = 10 ) {
       	global $wp_filter;
       	$is_hook_removed = false;
       	if ( ! empty( $wp_filter[ $tag ]->callbacks[ $priority ] ) ) {
       		$methods = array_filter(wp_list_pluck(
       			$wp_filter[ $tag ]->callbacks[ $priority ],
       			'function'
       		), function ($method) {
       			return is_string($method) || is_array($method);
       		});
       		$found_hooks = ! empty( $methods ) ? wp_list_filter( $methods, array( 1 => $method_name ) ) : array();
       		foreach( $found_hooks as $hook_key => $hook ) {
       			if ( ! empty( $hook[0] ) && is_object( $hook[0] ) && get_class( $hook[0] ) === $class_name ) {
       				$wp_filter[ $tag ]->remove_filter( $tag, $hook, $priority );
       				$is_hook_removed = true;
       			}
       		}
       	}
       	return $is_hook_removed;
       }
       ```
   
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/hide-insert-snippets-source-button-from-content-editor/#post-17075501)
 * [@indrabhusanroy](https://wordpress.org/support/users/indrabhusanroy/) can I 
   clarify whether you are using the WordPress Classic Editor, or the new Gutenberg-
   powered Block Editor?

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

The topic ‘Hide “Insert snippets source” Button from Content Editor’ 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/)

 * 2 replies
 * 3 participants
 * Last reply from: [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/hide-insert-snippets-source-button-from-content-editor/#post-17075501)
 * Status: resolved