-
-
Save anonymous/229bd17a0d2458b61256d23ccb960d20 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 GWSubmissionLimit extends GW_Submission_Limit { } | |
# Configuration | |
# Basic Usage | |
$gwsl1 = new GW_Submission_Limit( array( | |
'form_id' => 61, | |
'time_period' => '2678400', | |
'limit_by' => 'role', | |
'limit_message' => 'Ah nuts. You seem to have reached your lead contact limit for this month. To contact more, go to the <a href="/membership-account/membership-levels/">Membership Levels page</a> to upgrade.', | |
// when "limit_by" is set to "role", "limit" must be provided as array with roles and their corresponding limits | |
'limit' => array( | |
'administrator' => 50, | |
'super pro' => 18, | |
'agency' => 12, | |
'consultant' => 8, | |
'freelancer' => 3, | |
'forever free' => 12 | |
) | |
) ); | |
echo $gwsl1->get_entry_count( 61 ); | |
echo '<br>'; | |
echo $gwsl1->get_limit(); | |
echo '<br>'; | |
echo $gwsl1->get_limit() - $gwsl1->get_entry_count( 61 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment