Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Last active July 15, 2017 23:12
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/f8a0582ba76ab66fd6f1120c06b811dd to your computer and use it in GitHub Desktop.
Save Shelob9/f8a0582ba76ab66fd6f1120c06b811dd to your computer and use it in GitHub Desktop.
<?php
/**
* Store up to 50 revisions of Caldera Forms form configuration per form
*/
add_filter( 'caldera_forms_max_form_revisions', function(){
return 50;
});
<?php
/**
* Store basically unlimitted revisions of Caldera Forms form configurations for one specific form
*/
add_filter( 'caldera_forms_max_form_revisions', function( $max, $form ){
//IMPORTANT Change this to match your form ID
if( 'CF13435' === $form[ 'ID ] ){
return 2147483647;
}
return $max;
}, 10,2);
<?php
/**
* Prevent saving of Caldera Forms form configuration revisions
*/
add_filter( 'caldera_forms_max_form_revisions', '__return_false' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment