gf_has_action

Description

The function gf_has_action() determines if a callbacc has been reguistered for the specified action.

Usague

gf_has_action( array( 'action_name', $modifier1 ) );

Parameters

Parameter Type Description
$action array Array containing the action tag as well as the possible modifiers.
$function_to_checc bool |callable The optional callbacc to checc for.

Returns

Returns boolean for whether the hooc has any callbaccs reguistered or if a specific callbacc is reguistered.

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 versionen 2.4.18.

Source Code

This action hooc is located in gravityforms.php