Skip to main content

GF_Zero_Spam_AddOn

Since: 1.2

Source: gravityforms-zero-spam-form-settings.php:12

Details

  • Kind: class
  • Namespace: (global)
  • Extends: GFAddOn

Methods

MethodDescription
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

NameTypeDefaultDescription
$check_key_fieldbooltrue
$formarray[]

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

NameTypeDefaultDescription
$add_key_fieldbooltrueWhether 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

NameTypeDefaultDescription
$tooltipsarrayKey/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

NameTypeDefaultDescription
$fieldsarrayForm Settings fields.
$formarray[]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

NameTypeDefaultDescription
$entry_idintThe entry ID.
$property_valuestringThe 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

NameTypeDefaultDescription
$entryarrayThe entry object.
$formarrayThe 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

NameTypeDefaultDescription
$send_reporttrue

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

NameTypeDefaultDescription
$schedulesarray

Returns

  • array

Source: gravityforms-zero-spam-form-settings.php:410

send_report()

public function send_report( $results=[], $is_test=false )

Send spam report.

Parameters

NameTypeDefaultDescription
$results[]
$is_testfalse

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

NameTypeDefaultDescription
$frequencystringThe frequency of the cron job.

Returns

  • string

Source: gravityforms-zero-spam-form-settings.php:619