• Resolved Rune Rasmussen

    (@syntaxerrorno)


    After installing MetaSlider it’s added a new button for ‘Add slideshow’ above the classic editor, and we don’t want that, so how can we remove it?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Rune Rasmussen

    (@syntaxerrorno)

    Found it, but would still be nice to have a setting for it … 😉

    Snippet or mu-plugin:
    add_filter( 'metaslider_capability', '__return_false');

    Thread Starter Rune Rasmussen

    (@syntaxerrorno)

    Actually that doesn’t work as expected, as it also removes the menu items etc.

    And from what I can tell the code doesn’t add possibilities for removing it with a simple snippet, but please tell me how to do it if I’m wrong …

    Arreane

    (@yanex)

    Hi,

    Please add the following code below to your functions.php to hide the Add Slideshow button from the classic editor.

    add_action( 'init', 'remove_filters' );
    function remove_filters(){
        global $wp_filter;
       
        foreach($wp_filter['media_buttons']->callbacks[10] as $filter_callback => $value) {
        	if(strpos($filter_callback, 'insert_metaslider_button') !== false) {
        		unset($wp_filter['media_buttons']->callbacks[10][$filter_callback]);	
        	}
        }
    }
    Thread Starter Rune Rasmussen

    (@syntaxerrorno)

    Works nicely, thanks. 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove ‘Add slideshow’ button from all WYSIWYG editors’ is closed to new replies.