Created
July 14, 2017 21:01
-
-
Save Shelob9/4eee9ae127d597ebf5d2808a25faeef5 to your computer and use it in GitHub Desktop.
Force all Caldera Forms to save entries or disable entry tracking for all forms using the caldera_forms_get_form filter See: https://calderaforms.com/doc/caldera_forms_get_form
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 entry saving for all Caldera Forms | |
*/ | |
add_filter( 'caldera_forms_get_form', function( $form ){ | |
$form[ 'db_support' ] = 1; | |
return $form; | |
}); | |
/** | |
* Disable entry saving for all Caldera Forms | |
*/ | |
add_filter( 'caldera_forms_get_form', function( $form ){ | |
$form[ 'db_support' ] = 0; | |
return $form; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment