-
-
Save anonymous/d01c641a572379ecd0e037f1314e95cf to your computer and use it in GitHub Desktop.
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
class Custom_Submission_Limit extends GW_Submission_Limit { | |
public function is_applicable_form( $form ) { | |
$form_id = isset( $form['id'] ) ? $form['id'] : $form; | |
return in_array( $form_id, array( 2, 3, 4, 5, 9 ) ); | |
} | |
} | |
# Configuration | |
# Basic Usage | |
new Custom_Submission_Limit( array( | |
'limit_by' => 'field_value', | |
'limit' => array( | |
// "18" is your field ID, "1" is your limit for this field ID | |
18 => 1 | |
), | |
'time_period' => 60 * 60 * 24 * 10, | |
'limit_message' => 'Ati trimis deja o solicitare in ultimele 10 zile.' | |
) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment