admin管理员组文章数量:1414628
I am following this DIY code by GravityWiz but the author doesn't mention how to make the code work with 30 minutes, 1 hour, 2 hours, etc...? He only explains how to make it work with 24 hours - /
When looking at the code here - .php
Does this mean I make the functions:
# Basic Usage
new GW_Submission_Limit( array(
'form_id' => 86,
'limit' => 1,
'time_period' => '60',
'limit_message' => 'Aha! You have been limited for 60 minutes!.'
) );
Would this be the right way to do it? I posted a comment on their site but never got an answer, which was a few days ago :(
I am following this DIY code by GravityWiz but the author doesn't mention how to make the code work with 30 minutes, 1 hour, 2 hours, etc...? He only explains how to make it work with 24 hours - http://gravitywiz/better-limit-submission-per-time-period-by-user-or-ip/
When looking at the code here - https://gist.githubusercontent/spivurno/4024361/raw/gw-gravity-forms-submission-limit.php
Does this mean I make the functions:
# Basic Usage
new GW_Submission_Limit( array(
'form_id' => 86,
'limit' => 1,
'time_period' => '60',
'limit_message' => 'Aha! You have been limited for 60 minutes!.'
) );
Would this be the right way to do it? I posted a comment on their site but never got an answer, which was a few days ago :(
Share Improve this question asked Jun 5, 2015 at 0:20 MikeMike 616 bronze badges 1 |2 Answers
Reset to default 1I've updated the article with more detailed instructions on the time_period usage. For others having the same question here:
The period of time to which the limit applies. The default time period is one day. In any 24 hour period, if the user reaches the limit they will no longer be able to make new submissions.
If you want to limit by less than a day, you can provide the time period in seconds. A time period of 60 would be one minute (60 seconds). A time period of 60 * 60 (or 3600) would be one hour.
Also supported are three different calendar periods: per_day, per_month, per_year. Calendar time periods are more rigid time periods that “reset” when the calendar time period expires (i.e. one month ends and another begins).
If you do not want to limit by a time period at all, set the time period to false.
The period of time to which the limit applies. The default time period is one day. In any 24 hour period, if the user reaches the limit they will no longer be able to make new submissions.
If you want to limit by less than a day, you can provide the time period in seconds. A time period of 60 would be one minute (60 seconds). A time period of 60 * 60 (or 3600) would be one hour.
本文标签: phpGravityForms Limit Submission Per Time Period by User or IP by 30 minutes
版权声明:本文标题:php - GravityForms Limit Submission Per Time Period by User or IP by 30 minutes? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745189875a2646863.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
'time_period' => 60
, 30 Minutes:'time_period' => 30 * 60
, 1 hour:'time_period' => 60 * 60
, 2 hours:'time_period' => 2 * 60 * 20
. – Shaun Cockerill Commented Mar 9, 2022 at 3:53