Last active
August 18, 2020 15:48
-
-
Save Shelob9/7dd652bfdda104926ceccde4556af0b7 to your computer and use it in GitHub Desktop.
Unregister Caldera Forms shortcode button. See: https://calderaforms.com/doc/remove-caldera-forms-shortcode-button-post-editor/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'admin_enqueue_scripts', function() { | |
wp_deregister_script('caldera-forms-shortcode-insert'); | |
}, 15 ); |
Try this:
<?php
add_action( 'plugins_loaded', function(){
remove_action( 'media_buttons', array( Caldera_Forms_Admin::get_instance(), 'shortcode_insert_button' ), 11 );
}, 15 );
None of them work for me, either.
What actually did work was changing the action from plugins_loaded
to admin_head
, like this:
add_action( 'admin_head', function(){
remove_action( 'media_buttons', array( Caldera_Forms_Admin::get_instance(), 'shortcode_insert_button' ), 11 );
}, 15 );
WHERE do these snippets of code, or these php files go? A particular directory a particular file? Thanks.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
doesn't work for me...