Skip to content

Instantly share code, notes, and snippets.

@goldhat
Created April 8, 2017 14:50
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 goldhat/065aa1a84e4e4735ea5c9b8d0b675e45 to your computer and use it in GitHub Desktop.
Save goldhat/065aa1a84e4e4735ea5c9b8d0b675e45 to your computer and use it in GitHub Desktop.
Filter gpls_rulegroups from Gravity Perks Submission Limits
// Method A - using form ID
add_filter('gpls_rulegroups', 'gpls_globalize');
function gpls_globalize( $rulegroups ) {
return array_merge( $rulegroups, GPLS_RuleGroup::load_by_form( 2 ) );
}
// Method B - using rulegroup id (GF feed ID)
add_filter('gpls_rulegroups', 'gpls_globalize');
function gpls_globalize( $rulegroups ) {
$rulegroups[] = GPLS_RuleGroup::load_by_id( 60 ) );
return $rulegroups;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment