Last active
July 30, 2018 13:15
-
-
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/
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 | |
/** | |
* 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