gform_tooltips

gform_tooltips

DescriptionUsageParametersExamplesSource Code

Description
This filter is executed before any Gravity Form admin page is loaded. It can be used to change existing tooltips or add new ones (adding new tooltips is useful when developing add-ons for Gravity Forms).
Usage
add_filter( 'gform_tooltips', 'add_tooltips' );

Parameters

$tooltips array
An array with the existing tooltips. It is an associative array where the key is the tooltip name and the value is the tooltip.
$tooltips['some_new_feature'] = 'Help text for the new feature goes here';

Examples
This example adds 3 new tooltips to the list.
add_filter( 'gform_tooltips', 'add_tooltips' );
function add_tooltips( $tooltips ) {
$tooltips['feature_1'] = 'Tooltip for feature 1';
$tooltips['feature_2'] = 'Tooltip for feature 2';
$tooltips['feature_3'] = 'Tooltip for feature 3';
return $tooltips;
}

Source Code
This filter is located in gform_tooltip() in tooltips.php.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注