Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Last active November 8, 2017 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shelob9/d29bf4b9af6588da9e7a757fecf559fa to your computer and use it in GitHub Desktop.
Save Shelob9/d29bf4b9af6588da9e7a757fecf559fa to your computer and use it in GitHub Desktop.
<?php
/**
* Prevent Caldera Forms from loading JavaScript or CSS in the post editor for any post type
*/
add_filter( 'caldera_forms_insert_button_include', '__return_false' );
<?php
/**
* Prevent Caldera Forms from loading JavaScript or CSS in the post editor when post type is a specific custom post type
*/
add_filter( 'caldera_forms_insert_button_include', function( $include, $post_type ){
if( 'listing' === $post_type ){
$include = false;
}
return $include;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment