Description
This filter is executed before any Gravity Forms 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
| Parameter | Type | Description |
|---|---|---|
$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
Add new tooltips to the list.
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;
}
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Source Code
This filter is located in gform_tooltip() in tooltips.php.