gform_has_admin_notices

Description

The gform_has_admin_notices filter is used to determine whether or not to display the “WordPress has new notifications.” notice at the top of Gravity Forms admin pages.

Usage

The filter which runs on Gravity Forms admin pages would be used like so:

add_filter( 'gform_has_admin_notices', 'your_function_name' );

Parameters

  • $has_notices bool

    Defaults to false; there are no notifications to display.

Examples

Enable the notice

add_filter( 'gform_has_admin_notices', '__return_true' );

Disable the notice

add_filter( 'gform_has_admin_notices', '__return_false' );

Placement

This code should be placed in the functions.php file of your active theme or a custom functions plugin.

Since

This filter was added in Gravity Forms v2.5.

Source Code

This filter is located in GCommon::notices_section() in common.php.