Created
September 26, 2018 11:24
-
-
Save spivurno/7d41492281d02c167cea5f205be6295c to your computer and use it in GitHub Desktop.
Gravity Perks // GP Limit Submissions // Dynamically Set Limit
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 | |
/** | |
* Gravity Perks // GP Limit Submissions // Dynamically Set Limit | |
* http://gravitywiz.com/gravity-forms-limit-submissions/ | |
*/ | |
add_filter( 'gpls_rule_groups', function( $rule_groups ) { | |
foreach( $rule_groups as &$rule_group ) { | |
if( $rule_group->name == 'Your Feed Name' ) { | |
$rule_group->limit = 100; | |
} | |
} | |
return $rule_groups; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👉 This Gist has been migrated to the Gravity Wiz Snippet Library:
https://github.com/gravitywiz/snippet-library/blob/master/gp-limit-submissions/gpls-dynamically-set-limit.php