Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Created July 14, 2017 21:01
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/4eee9ae127d597ebf5d2808a25faeef5 to your computer and use it in GitHub Desktop.
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
<?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