Hook to Disable Admin Backend Tooltips [RESOLVED]

Would like to request a hook/option to disable all tooltips from the Admin Backend.

Tooltips are handy for the uninitiated but tend to popup in the way of fields thus blocking me from accessing them with a mouse click. Would prefer to simply disable them, all of them.

Currently I’ve just been replacing line 210 in tooltips.php with:

if ( $tooltip_text ) {
  return '';
}

This way all tooltips are disabled. The backend is beautiful once again. No doubt this is not ideal, upon plugin update this will revert. Hence the desire for an option setting or function hook.

Thank you for your time and assistance!

I believe you can just return ''; with this filter:

Thank you for the reply and consideration Chris.

Adding that filter to my functions.php file ( and telling the function to return ‘’ ), as suggested, unfortunately didn’t work. I believe its only for adding rather than subtracting or overwriting.

add_filter( 'gform_tooltips', 'add_tooltips' );
function add_tooltips() {
   return '';
}

My reading comprehension skills are lacking today. That filter states that: “It can be used to change existing tooltips”

Now how would one loop through all and set them to return ‘’ ?

@chrishajer’s suggestion worked for me. However, I’d modify it to return an array (rather than empty string) since an array is expected. Returning an empty string causes PHP errors when running Gravity Perks. I expect other plugins that hook into gform_tooltips could throw the same.

add_filter( 'gform_tooltips', function( $tooltips ) {
	return array();
} );
2 Likes

Thank you @uamv that did the trick.

2 Likes

That was a quick but incorrect suggestion I gave! Glad you were able to make it work. Thanks @uamv.

1 Like