Overview

Classes

  • GF_Personal_Data
  • GFAddOn
  • GFAddOnFeedsTable
  • GFAPI
  • GFFeedAddOn
  • GFPaymentAddOn
  • GFPaymentStatsTable
  • Overview
  • Class

Class GFFeedAddOn

Class GFAddOn

Handles all tasks mostly common to any Gravity Forms Add-On, including third party ones.

GFAddOn
Extended by GFFeedAddOn

Direct known subclasses

GFPaymentAddOn
Abstract
Used by: GFPaymentAddOn
Located at addon/class-gf-feed-addon.php
Methods summary
public
# init( )

Plugin starting point. Handles hooks and loading of language files.

Plugin starting point. Handles hooks and loading of language files.

Used by

GFPaymentAddOn::init()

Overrides

GFAddOn::init()
public
# init_ajax( )

Override this function to add AJAX hooks or to add initialization code when an AJAX request is being performed

Override this function to add AJAX hooks or to add initialization code when an AJAX request is being performed

Used by

GFPaymentAddOn::init_ajax()

Overrides

GFAddOn::init_ajax()
public
# init_admin( )

Override this function to add initialization code (i.e. hooks) for the admin site (WP dashboard)

Override this function to add initialization code (i.e. hooks) for the admin site (WP dashboard)

Used by

GFPaymentAddOn::init_admin()

Overrides

GFAddOn::init_admin()
public
# setup( )

Performs upgrade tasks when the version of the Add-On changes. To add additional upgrade tasks, override the upgrade() function, which will only get executed when the plugin version has changed.

Performs upgrade tasks when the version of the Add-On changes. To add additional upgrade tasks, override the upgrade() function, which will only get executed when the plugin version has changed.

Used by

GFPaymentAddOn::setup()

Overrides

GFAddOn::setup()
public
# post_gravityforms_upgrade( mixed $db_version, mixed $previous_db_version, mixed $force_upgrade )

Gets called when Gravity Forms upgrade process is completed. This function is intended to be used internally, override the upgrade() function to execute database update scripts.

Gets called when Gravity Forms upgrade process is completed. This function is intended to be used internally, override the upgrade() function to execute database update scripts.

Parameters

$db_version
Current Gravity Forms database version
$previous_db_version
Previous Gravity Forms database version
$force_upgrade
True if this is a request to force an upgrade. False if this is a standard upgrade (due to version change)

Overrides

GFAddOn::post_gravityforms_upgrade()
public
# scripts( )

Override this function to provide a list of scripts to be enqueued. When overriding this function, be sure to call parent::scripts() to ensure the base class scripts are enqueued. Following is an example of the array that is expected to be returned by this function: <pre> <code>

Override this function to provide a list of scripts to be enqueued. When overriding this function, be sure to call parent::scripts() to ensure the base class scripts are enqueued. Following is an example of the array that is expected to be returned by this function:

<code>

array(
       array(
           'handle'    => 'maskedinput',
           'src'       => GFCommon::get_base_url() . '/js/jquery.maskedinput-1.3.min.js',
           'version'   => GFCommon::$version,
           'deps'      => array( 'jquery' ),
           'in_footer' => false,

           // Determines where the script will be enqueued. The script will be enqueued if any of the conditions match.
           'enqueue'   => array(
               // admin_page - Specified one or more pages (known pages) where the script is supposed to be enqueued.
               // To enqueue scripts in the front end (public website), simply don't define this setting.
               array( 'admin_page' => array( 'form_settings', 'plugin_settings' ) ),

               // tab - Specifies a form settings or plugin settings tab in which the script is supposed to be enqueued.
               // If none are specified, the script will be enqueued in any of the form settings or plugin_settings page
               array( 'tab' => 'signature'),

               // query - Specifies a set of query string ($_GET) values.
               // If all specified query string values match the current requested page, the script will be enqueued
               array( 'query' => 'page=gf_edit_forms&view=settings&id=_notempty_' )

               // post - Specifies a set of post ($_POST) values.
               // If all specified posted values match the current request, the script will be enqueued
               array( 'post' => 'posted_field=val' )
           )
       ),
       array(
           'handle'   => 'super_signature_script',
           'src'      => $this->get_base_url() . '/super_signature/ss.js',
           'version'  => $this->_version,
           'deps'     => array( 'jquery'),
           'callback' => array( $this, 'localize_scripts' ),
           'strings'  => array(
               // Accessible in JavaScript using the global variable "[script handle]_strings"
               'stringKey1' => __( 'The string', 'gravityforms' ),
               'stringKey2' => __( 'Another string.', 'gravityforms' )
           )
           "enqueue"  => array(
               // field_types - Specifies one or more field types that requires this script.
               // The script will only be enqueued if the current form has a field of any of the specified field types.
               // Only applies when a current form is available.
               array( 'field_types' => array( 'signature' ) )
           )
       )
   );

</code>

Overrides

GFAddOn::scripts()
public
# uninstall( )

Called when the user chooses to uninstall the Add-On - after permissions have been checked and before removing all Add-On settings and Form settings.

Called when the user chooses to uninstall the Add-On - after permissions have been checked and before removing all Add-On settings and Form settings.

Override this method to perform additional functions such as dropping database tables.

Return false to cancel the uninstall request.

Overrides

GFAddOn::uninstall()
public array
# maybe_process_feed( array $entry, array $form )

Determines what feeds need to be processed for the provided entry.

Determines what feeds need to be processed for the provided entry.

Parameters

$entry
The Entry Object currently being processed.
$form
The Form Object currently being processed.

Returns

array
$entry
public boolean
# maybe_delay_feed( array $entry, array $form )

Determines if feed processing is delayed by the PayPal Standard Add-On.

Determines if feed processing is delayed by the PayPal Standard Add-On.

Also enables use of the gform_is_delayed_pre_process_feed filter.

Parameters

$entry
The Entry Object currently being processed.
$form
The Form Object currently being processed.

Returns

boolean
bool
public boolean|null
# is_delayed( array $paypal_feed )

Retrieves the delay setting for the current add-on from the PayPal feed.

Retrieves the delay setting for the current add-on from the PayPal feed.

Parameters

$paypal_feed
The PayPal feed which is being used to process the current submission.

Returns

boolean|null
bool|null
public boolean
# is_asynchronous( array $feed, array $entry, array $form )

Determines if feed processing should happen asynchronously.

Determines if feed processing should happen asynchronously.

Parameters

$feed
The Feed Object currently being processed.
$entry
$form The Form Object currently being processed.
$form
$entry The Entry Object currently being processed.

Returns

boolean
bool

Since

2.2
public array|null
# process_feed( array $feed, array $entry, array $form )

Processes feed action.

Processes feed action.

Parameters

$feed
The Feed Object currently being processed.
$entry
The Entry Object currently being processed.
$form
The Form Object currently being processed.

Returns

array|null
Returns a modified entry object or null.

Since

Unknown
public
# delay_feed( mixed $feed, mixed $entry, mixed $form )
public
# is_feed_condition_met( mixed $feed, mixed $form, mixed $entry )

Used by

GFPaymentAddOn::get_payment_feed()
public string
# create_feed_nonce( )

Create nonce for asynchronous feed processing.

Create nonce for asynchronous feed processing.

Returns

string
The nonce.

Since

2.2
public integer|boolean
# verify_feed_nonce( string $nonce )

Verify nonce for asynchronous feed processing.

Verify nonce for asynchronous feed processing.

Parameters

$nonce
Nonce to be verified.

Returns

integer|boolean
int|bool

Since

1.0
public array
# supported_notification_events( array $form )

Retrieves notification events supported by Add-On.

Retrieves notification events supported by Add-On.

Parameters

$form

Returns

array
array
public array
# notification_events( array $events, array $form )

Add notifications events supported by Add-On to notification events list.

Add notifications events supported by Add-On to notification events list.

Parameters

$events
$form

Returns

array
$events
public
# get_feeds( mixed $form_id = null )

Used by

GFPaymentAddOn::get_payment_feed()
public
# get_active_feeds( mixed $form_id = null )
public
# get_feeds_by_slug( mixed $slug, mixed $form_id = null )
public
# get_current_feed( )
public
# get_current_feed_id( )
public
# get_feed( mixed $id )

Used by

GFFeedAddOn::duplicate_feed()
GFPaymentAddOn::get_payment_feed()
public
# get_feeds_by_entry( mixed $entry_id )

Used by

GFPaymentAddOn::get_payment_feed()
public
# has_feed( mixed $form_id, mixed $meets_conditional_logic = null )
public
# get_single_submission_feed( mixed $entry = false, mixed $form = false )
public boolean|array
# get_single_submission_feed_by_form( array $form, array|false $entry )

Return the active feed to be used when processing the current entry, evaluating conditional logic if configured.

Return the active feed to be used when processing the current entry, evaluating conditional logic if configured.

Parameters

$form
The current form.
$entry
The current entry.

Returns

boolean|array
bool|array
public
# pre_process_feeds( mixed $feeds, mixed $entry, mixed $form )

Used by

GFPaymentAddOn::get_payment_feed()
public string
# get_default_feed_name( )

Get default feed name.

Get default feed name.

Returns

string
string

Since

Unknown
public
# is_unique_feed_name( mixed $name, mixed $form_id )

Used by

GFFeedAddOn::duplicate_feed()
public
# update_feed_meta( mixed $id, mixed $meta )
public
# update_feed_active( mixed $id, mixed $is_active )
public
# insert_feed( mixed $form_id, mixed $is_active, mixed $meta )

Used by

GFFeedAddOn::duplicate_feed()
public
# delete_feed( mixed $id )
public
# delete_feeds( mixed $form_id = null )
public integer
# duplicate_feed( integer|array $id, mixed $new_form_id = false )

Duplicates the feed.

Duplicates the feed.

Parameters

$id
The ID of the feed to be duplicated or the feed object when duplicating a form.
$new_form_id
False when using feed actions or the ID of the new form when duplicating a form.

Returns

integer
New feed ID.

Since

1.9.15

Uses

GFFeedAddOn::can_duplicate_feed()
GFFeedAddOn::get_feed()
GFFeedAddOn::insert_feed()
GFFeedAddOn::is_unique_feed_name()
public
# post_form_duplicated( integer $form_id, integer $new_id )

Maybe duplicate feeds when a form is duplicated.

Maybe duplicate feeds when a form is duplicated.

Parameters

$form_id
The ID of the original form.
$new_id
The ID of the duplicate form.
public
# save_feed_order( array $feed_order )

Save order of feeds.

Save order of feeds.

Parameters

$feed_order
Array of feed IDs in desired order.

Since

2.0
public
# form_settings_init( )

Initializes form settings page Hooks up the required scripts and actions for the Form Settings page

Initializes form settings page Hooks up the required scripts and actions for the Form Settings page

Overrides

GFAddOn::form_settings_init()
public
# ajax_toggle_is_active( )
public
# ajax_save_feed_order( )
public
# form_settings_sections( )
public
# form_settings( mixed $form )

Custom form settings page Override this function to implement a complete custom form settings page. Before overriding this function, consider using the form_settings_fields() and specifying your field meta.

Custom form settings page Override this function to implement a complete custom form settings page. Before overriding this function, consider using the form_settings_fields() and specifying your field meta.

Overrides

GFAddOn::form_settings()
public
# is_feed_list_page( )
public
# is_detail_page( )
public
# form_settings_header( )
public
# form_settings_title( )
public
# feed_edit_page( mixed $form, mixed $feed_id )
public
# settings( mixed $sections )

Overrides

GFAddOn::settings()
public
# feed_settings_title( )
public
# feed_list_page( mixed $form = null )
public
# get_feed_table( mixed $form )
public
# feed_list_title( )
public
# maybe_save_feed_settings( mixed $feed_id, mixed $form_id )
public
# trim_conditional_logic_vales( mixed $settings, mixed $form_id )
public
# get_save_success_message( mixed $sections )

Overrides

GFAddOn::get_save_success_message()
public
# get_save_error_message( mixed $sections )

Overrides

GFAddOn::get_save_error_message()
public
# save_feed_settings( mixed $feed_id, mixed $form_id, mixed $settings )
public
# get_feed_settings_fields( )
public
# feed_settings_fields( )
public
# add_default_feed_settings_fields_props( mixed $fields )
public
# get_bulk_actions( )
public
# process_bulk_action( mixed $action )
public
# process_single_action( mixed $action )
public
# get_action_links( )
public
# feed_list_columns( )
public string
# feed_list_no_item_message( )

Override this function to change the message that is displayed when the feed list is empty

Override this function to change the message that is displayed when the feed list is empty

Returns

string
The message
public string|false
# feed_list_message( )

Override this function to force a message to be displayed in the feed list (instead of data). Useful to alert users when main plugin settings haven't been completed.

Override this function to force a message to be displayed in the feed list (instead of data). Useful to alert users when main plugin settings haven't been completed.

Returns

string|false
string|false
public
# configure_addon_message( )
public boolean|true
# can_create_feed( )

Override this function to prevent the feed creation UI from being rendered.

Override this function to prevent the feed creation UI from being rendered.

Returns

boolean|true
boolean|true
public boolean|true
# can_duplicate_feed( integer|array $id )

Override this function to allow the feed to being duplicated.

Override this function to allow the feed to being duplicated.

Parameters

$id
The ID of the feed to be duplicated or the feed object when duplicating a form.

Returns

boolean|true
boolean|true

Used by

GFFeedAddOn::duplicate_feed()
public
# get_column_value( mixed $item, mixed $column )
public
# update_form_settings( mixed $form, mixed $new_form_settings )
public
# get_default_feed_id( mixed $form_id )
public
# settings_feed_condition( mixed $field, mixed $echo = true )
public
# get_feed_condition_checkbox( mixed $field )
public
# get_feed_condition_hidden_field( )
public
# get_feed_condition_conditional_logic( )
public
# validate_feed_condition_settings( mixed $field, mixed $settings )
public static
# add_entry_meta( mixed $form )
public
# has_feed_condition_field( )
public
# add_delayed_payment_support( mixed $options )
public array
# add_paypal_post_payment_actions( array $feed_settings_fields )

Add the Post Payments Actions setting to the PayPal feed.

Add the Post Payments Actions setting to the PayPal feed.

Parameters

$feed_settings_fields
The PayPal feed settings.

Returns

array
array
public
# paypal_fulfillment( mixed $entry, mixed $paypal_config, mixed $transaction_id, mixed $amount )
public
# add_feed_error( mixed $error_message, mixed $feed, mixed $entry, mixed $form )
public
# get_paypal_feed( mixed $form_id, mixed $entry )
public
# has_paypal_payment( mixed $feed, mixed $form, mixed $entry )
public
# is_delayed_payment( mixed $entry, mixed $form, mixed $is_delayed )
public static
# get_paypal_payment_amount( mixed $form, mixed $entry, mixed $paypal_config )
public
# has_frontend_feeds( mixed $form )
public
# register_frontend_feeds( mixed $form )
public
# add_frontend_feeds( mixed $form_id, mixed $feeds )
public
# get_frontend_feeds( mixed $form )
public static
# register_frontend_feeds_init_script( mixed $form )
Methods inherited from GFAddOn
__construct(), add_default_save_button(), add_field(), add_field_after(), add_field_before(), add_form_settings_menu(), add_note(), app_settings(), app_settings_fields(), app_settings_icon(), app_settings_tab(), app_settings_title(), app_settings_uninstall_tab(), app_tab_page(), app_tab_page_footer(), app_tab_page_header(), build_choices(), checkbox_input(), checkbox_item(), choices_have_icon(), create_app_menu(), create_plugin_page_menu(), current_user_can_any(), current_user_can_uninstall(), failed_requirements_init(), field_failed_validation(), field_map_table_header(), field_map_title(), filter_settings(), filter_ure_capabilities_groups_tree(), filter_ure_custom_capability_groups(), form_settings_fields(), form_settings_icon(), form_settings_page_title(), get_all_deprecated_protected_methods(), get_app_menu_icon(), get_app_menu_items(), get_app_setting(), get_app_settings(), get_app_settings_tabs(), get_base_path(), get_base_url(), get_capabilities(), get_choice_attributes(), get_conditional_logic_fields(), get_current_form(), get_current_settings(), get_default_field_select_field(), get_deprecated_protected_methods_for_base_class(), get_dynamic_field_map_fields(), get_entry_meta(), get_error_icon(), get_field(), get_field_attributes(), get_field_errors(), get_field_map_choices(), get_field_map_fields(), get_field_value(), get_first_field_by_type(), get_form_fields_as_choices(), get_form_settings(), get_full_address(), get_full_name(), get_generic_map_fields(), get_gfaddon_base_path(), get_gfaddon_base_url(), get_list_field_value(), get_locking_config(), get_locking_object_id(), get_mapped_field_name(), get_mapped_field_value(), get_mapping_field(), get_members_caps(), get_path(), get_plugin_setting(), get_plugin_settings(), get_plugin_settings_url(), get_posted_settings(), get_previous_settings(), get_registered_addons(), get_required_indicator(), get_results_page_config(), get_save_button(), get_select_option(), get_select_options(), get_setting(), get_short_title(), get_slug(), get_version(), has_app_menu(), has_app_settings(), has_deprecated_elements(), has_plugin_settings_page(), has_setting_field_type(), init_addons(), init_frontend(), is_app_settings(), is_choice_valid(), is_entry_edit(), is_entry_list(), is_entry_view(), is_form_editor(), is_form_list(), is_form_settings(), is_gravityforms_installed(), is_gravityforms_supported(), is_json(), is_locking_edit_page(), is_locking_list_page(), is_locking_view_page(), is_object_locked(), is_plugin_page(), is_plugin_settings(), is_postback(), is_preview(), is_print(), is_results(), is_save_postback(), is_simple_condition_met(), list_row_class(), load_screen_options(), load_text_domain(), lock_info(), maybe_decode_json(), maybe_get_tooltip(), maybe_override_field_value(), maybe_save_app_settings(), maybe_save_form_settings(), maybe_save_plugin_settings(), maybe_wp_kses(), meets_minimum_requirements(), members_register_cap_group(), members_register_caps(), method_is_overridden(), minimum_requirements(), note_avatar(), notes_avatar(), plugin_message(), plugin_page(), plugin_page_container(), plugin_page_icon(), plugin_page_init(), plugin_page_title(), plugin_settings(), plugin_settings_fields(), plugin_settings_icon(), plugin_settings_init(), plugin_settings_link(), plugin_settings_page(), plugin_settings_title(), pre_init(), prepare_field_select_field(), prepare_settings_checkbox_and_select(), prepend_attribute(), register(), remove_field(), render_settings(), render_uninstall(), replace_field(), results_page_init(), save_form_settings(), set_field_error(), set_logging_supported(), set_previous_settings(), set_settings(), setting_dependency_met(), settings_checkbox(), settings_checkbox_and_select(), settings_dynamic_field_map(), settings_field_map(), settings_field_map_select(), settings_field_select(), settings_fields_only(), settings_generic_map(), settings_hidden(), settings_radio(), settings_save(), settings_select(), settings_select_custom(), settings_text(), settings_textarea(), simple_condition(), single_section(), single_setting(), single_setting_label(), single_setting_row(), single_setting_row_save(), styles(), table_exists(), uninstall_confirm_message(), uninstall_warning_message(), update_app_settings(), update_plugin_settings(), upgrade(), validate_checkbox_and_select_settings(), validate_checkbox_settings(), validate_field_map_settings(), validate_field_select_settings(), validate_radio_settings(), validate_select_custom_settings(), validate_select_settings(), validate_settings(), validate_text_settings(), validate_textarea_settings()
Properties summary
protected boolean $_multiple_feeds

If set to true, Add-On can have multiple feeds configured. If set to false, feed list page doesn't exist and only one feed can be configured.

If set to true, Add-On can have multiple feeds configured. If set to false, feed list page doesn't exist and only one feed can be configured.

#true
protected boolean $_single_feed_submission

If true, only first matching feed will be processed. Multiple feeds can still be configured, but only one is executed during the submission (i.e. Payment Add-Ons)

If true, only first matching feed will be processed. Multiple feeds can still be configured, but only one is executed during the submission (i.e. Payment Add-Ons)

#false
protected mixed $_single_submission_feed

If $_single_feed_submission is true, $_single_submission_feed will store the current single submission feed as stored by the get_single_submission_feed() method.

If $_single_feed_submission is true, $_single_submission_feed will store the current single submission feed as stored by the get_single_submission_feed() method.

Used by

GFPaymentAddOn::validation()
#false
protected boolean $_supports_feed_ordering

If true, users can configure what order feeds are executed in from the feed list page.

If true, users can configure what order feeds are executed in from the feed list page.

#false
protected boolean $_async_feed_processing

If true, feeds will be processed asynchronously in the background.

If true, feeds will be processed asynchronously in the background.

Since

2.2
#false
protected boolean $_supports_frontend_feeds

If true, feeds w/ conditional logic will evaluated on the frontend and a JS event will be triggered when the feed is applicable and inapplicable.

If true, feeds w/ conditional logic will evaluated on the frontend and a JS event will be triggered when the feed is applicable and inapplicable.

Since

2.4
#false
protected boolean $_bypass_feed_delay

If true, maybe_delay_feed() checks will be bypassed allowing the feeds to be processed.

If true, maybe_delay_feed() checks will be bypassed allowing the feeds to be processed.

#false
Properties inherited from GFAddOn
$_capabilities, $_capabilities_app_menu, $_capabilities_app_settings, $_capabilities_form_settings, $_capabilities_plugin_page, $_capabilities_settings_page, $_capabilities_uninstall, $_full_path, $_min_gravityforms_version, $_path, $_short_title, $_slug, $_title, $_url, $_version, $app_hook_suffix
Gravity Forms API API documentation generated by ApiGen 2.8.0