Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Last active August 18, 2020 15:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shelob9/7dd652bfdda104926ceccde4556af0b7 to your computer and use it in GitHub Desktop.
Save Shelob9/7dd652bfdda104926ceccde4556af0b7 to your computer and use it in GitHub Desktop.
<?php
add_action( 'admin_enqueue_scripts', function() {
wp_deregister_script('caldera-forms-shortcode-insert');
}, 15 );
<?php
add_action( 'plugins_loaded', function(){
remove_action( 'media_buttons', array( 'Caldera_Forms_Admin', 'shortcode_insert_button' ), 11 );
}, 15 );
@lucavlw
Copy link

lucavlw commented Jun 19, 2017

doesn't work for me...

@bucketpress
Copy link

bucketpress commented Aug 30, 2017

@lucavlw,

Try this:

<?php
add_action( 'plugins_loaded', function(){
	remove_action( 'media_buttons', array( Caldera_Forms_Admin::get_instance(), 'shortcode_insert_button' ), 11 );
}, 15 );

@Aetles
Copy link

Aetles commented Jan 5, 2018

None of them work for me, either.

@Aetles
Copy link

Aetles commented Jan 5, 2018

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 );

@Heres2u
Copy link

Heres2u commented Aug 18, 2020

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