gf_has_action

gf_has_action

DescriptionUsageParametersReturnsExamplesSinceSource Code

Description
Determines if a callback has been registered for the specified action.
Usage
gf_has_action( array( 'action_name', $modifier1 ) );

Parameters

$action array
Array containing the action tag as well as the possible modifiers.

$function_to_check bool|callable
The optional callback to check for.

Returns
Returns boolean for whether the hook has any callbacks registered or if a specific callback is registered.

Examples
$result = gf_has_action( array( 'gform_after_submission', $form_id ) );

$result = gf_has_action( array( 'gform_after_submission', $form_id ), 'the_function_name' );

Since
This function was added in Gravity Forms version 2.4.18.
Source Code
This action hook is located in gravityforms.php

gf_has_filters

gf_has_filters

DescriptionUsageParametersReturnsExamplesSinceSource Code

Description
Determines if a callback has been registered for the specified filter.
Usage
1gf_has_filters( array( 'filter_name', $modifier1 ) );
This helper function also has an alias, gf_has_filter, which can be used like so:
1gf_has_filter( array( 'filter_name', $modifier1 ) );

Parameters

$filter array
Array containing the filter tag as well as the possible modifiers.

$function_to_check bool|callable
The optional callback to check for.

Returns
Returns boolean for whether the hook has any callbacks registered or if a specific callback is registered.

Examples
1$result = gf_has_filters( array( 'gform_pre_render', $form_id ) );
1$result = gf_has_filter( array( 'gform_pre_render', $form_id ) );
1$result = gf_has_filters( array( 'gform_disable_view_counter', $form_id ), '__return_true' );
Since
The gf_has_filters and gf_has_filter functions were added in Gravity Forms version 2.4.18.
Source Code
These helper functions are located in gravityforms.php

GF_IMPORT_FILE

GF_IMPORT_FILE

DescriptionUsagePlacement

Description
Setting this option allows you to specify a Form JSON file from which a set of default forms can be pre-generated when a new site is created on your Multi-Site install.
Usage
1define( 'GF_IMPORT_FILE', 'http://www.domain.com/path/to/gf_import.json' );
Placement
This constant should be set in your wp-config.php. See the article Wp Config Options for more details regarding the JSON file.

GF_LICENSE_KEY

GF_LICENSE_KEY

DescriptionUsagePlacement

Description
Setting this option before installing Gravity Forms on a single site WP installation or before creating new sites on a multisite install will automatically pre-populate your Gravity Forms license key for those new installations.
Usage
define( 'GF_LICENSE_KEY', 'YOUR-LICENSE-KEY-HERE' );

Placement
This constant should be set in your wp-config.php. See the article Wp Config Options.

GF_LOGGING_DISABLE_NOTICE

GF_LOGGING_DISABLE_NOTICE

DescriptionUsagePlacement

Description
Allows the non-dismissible security notice which displays on every WordPress admin page when logging is enabled to be turned off.
Usage
define( 'GF_LOGGING_DISABLE_NOTICE', true );

Placement
This constant should be set in your wp-config.php. See the article Wp Config Options.

GF_RECAPTCHA_PRIVATE_KEY

GF_RECAPTCHA_PRIVATE_KEY

DescriptionUsagePlacement

Description
Automatically pre-populates the reCAPTCHA private key when a new site is created on your Multi-Site install.
Usage
define( 'GF_RECAPTCHA_PRIVATE_KEY', 'YOUR-KEY-HERE' );

Placement
This constant should be set in your wp-config.php. See the article Wp Config Options for more details.

GF_RECAPTCHA_PUBLIC_KEY

GF_RECAPTCHA_PUBLIC_KEY

DescriptionUsagePlacement

Description
Automatically pre-populates the reCAPTCHA public key when a new site is created on your Multi-Site install.
Usage
define( 'GF_RECAPTCHA_PUBLIC_KEY', 'YOUR-KEY-HERE' );

Placement
This constant should be set in your wp-config.php. See the article Wp Config Options for more details.