Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Last active July 30, 2018 13:15
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/1ebf510efc6e864140131924714999b7 to your computer and use it in GitHub Desktop.
Save Shelob9/1ebf510efc6e864140131924714999b7 to your computer and use it in GitHub Desktop.
example code for caldera_forms_pro_send_local filter. https://calderaforms.com/doc/caldera_forms_pro_send_local/
<?php
/**
* Force one form NOT TO send with Caldera Forms Pro
*/
add_filter( 'caldera_forms_pro_send_local', function( $send_local, $form_id ) {
if( 'CF123456' === $form_id ){
return true;
}
return $send_local;
},10,2);
/**
* Force one form TO send with Caldera Forms Pro
*/
add_filter( 'caldera_forms_pro_send_local', function( $send_local, $form_id ) {
if( 'CF123456' === $form_id ){
return false;
}
return $send_local;
},10,2);
/**
* Force all forms NOT TO send with Caldera Forms Pro
*/
add_filter( 'caldera_forms_pro_send_local', '__return_true' );
/**
* Force all forms TO send with Caldera Forms Pro
*/
add_filter( 'caldera_forms_pro_send_local', '__return_false' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment