Closed guillaumemolter closed 7 years ago
Hi @guillaumemolter -
It looks like the remove_action
call you have there is just a little bit off. Since the method that adds the media button is an instance method rather than a static method, you'd have to remove it like this:
remove_action( 'media_buttons', array( Shortcode_UI::get_instance(), 'action_media_buttons' ));
That function also takes the DOM element ID of the editor as an argument, so you should be able to remove that method and add your own callback which outputs the "Add post element" media button for only the editors that you want to actually support it for.
The new "Add Post Element" button is also showing up in instances of the tiny/compact WYSIWYG editor in bbPress (and most likely in comments, etc..). The button doesn't work but is here. I should also add that I am displaying the Media Library on purpose.
I've desperately tried to remove it using
remove_action( 'media_buttons', array( 'Shortcode_UI', 'action_media_buttons' ));
using different hooks and priorities but without success.1) I don't think the button should show by default 2) Any suggestions on how to remove it ?