GF_Zero_Spam_AddOn
Since: 1.2
Source: gravityforms-zero-spam-form-settings.php:12
Details
- Kind:
class - Namespace:
(global) - Extends: GFAddOn
Methods
| Method | Description |
|---|---|
get_menu_icon() | |
filter_gf_zero_spam_check_key_field() | Use global and per-form settings to determine whether to check for spam. |
filter_gf_zero_spam_add_key_field() | Use global setting to modify whether to add the spam key field to the form. |
add_tooltip() | Include custom tooltip text for the Zero Spam setting in the Form Settings page. |
add_settings_field() | Adds the Zero Spam field to the "Form Options" settings group in GF 2.5+. |
plugin_settings_fields() | Register addon global settings. |
update_status() | Check if entry limit has been reached after status update. |
after_submission() | Check if entry limit has been reached after submission. |
check_entry_limit() | Check if entry limit has been reached. |
add_cron_schedules() | Add monthly intervals to existing cron schedules. |
send_report() | Send spam report. |
update_cron_job() | Add cron job for spam reporting. |
Method Reference
get_menu_icon()
public function get_menu_icon()
Since: 1.4
Source: gravityforms-zero-spam-form-settings.php:46
filter_gf_zero_spam_check_key_field()
public function filter_gf_zero_spam_check_key_field( $check_key_field=true, $form=[] )
Use global and per-form settings to determine whether to check for spam.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$check_key_field | bool | true | |
$form | array | [] |
Returns
array|mixed
Source: gravityforms-zero-spam-form-settings.php:58
filter_gf_zero_spam_add_key_field()
public function filter_gf_zero_spam_add_key_field( $add_key_field=true )
Use global setting to modify whether to add the spam key field to the form.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$add_key_field | bool | true | Whether to add the spam key field to the form. |
Returns
bool— Whether to add the spam key field to the form.
Source: gravityforms-zero-spam-form-settings.php:81
add_tooltip()
public function add_tooltip( $tooltips )
Include custom tooltip text for the Zero Spam setting in the Form Settings page.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$tooltips | array | Key/Value pair of tooltip/tooltip text. |
Returns
array
Source: gravityforms-zero-spam-form-settings.php:100
add_settings_field()
function add_settings_field( $fields, $form=[] )
Adds the Zero Spam field to the "Form Options" settings group in GF 2.5+.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$fields | array | Form Settings fields. | |
$form | array | [] | The current form. |
Returns
array
See Also
Source: gravityforms-zero-spam-form-settings.php:117
plugin_settings_fields()
public function plugin_settings_fields()
Register addon global settings.
Returns
array
Source: gravityforms-zero-spam-form-settings.php:135
update_status()
public function update_status( $entry_id, $property_value )
Check if entry limit has been reached after status update.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$entry_id | int | The entry ID. | |
$property_value | string | The new status. |
Returns
void
Since: 1.4
Source: gravityforms-zero-spam-form-settings.php:349
after_submission()
public function after_submission( $entry )
Check if entry limit has been reached after submission.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$entry | array | The entry object. | |
$form | array | The form object. |
Returns
void
Since: 1.4
Source: gravityforms-zero-spam-form-settings.php:368
check_entry_limit()
public function check_entry_limit( $send_report=true )
Check if entry limit has been reached.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$send_report | true |
Returns
bool
Source: gravityforms-zero-spam-form-settings.php:382
add_cron_schedules()
public function add_cron_schedules( $schedules )
Add monthly intervals to existing cron schedules.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$schedules | array |
Returns
array
Source: gravityforms-zero-spam-form-settings.php:410
send_report()
public function send_report( $results=[], $is_test=false )
Send spam report.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$results | [] | ||
$is_test | false |
Returns
boolean
Source: gravityforms-zero-spam-form-settings.php:429
update_cron_job()
public function update_cron_job( $frequency )
Add cron job for spam reporting.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$frequency | string | The frequency of the cron job. |
Returns
string
Source: gravityforms-zero-spam-form-settings.php:619