gform_updates_list

Description

The gform_updates_list filters the available updates displayed on the Forms -> System Status -> Updates page.

Usage

Note: Set the run priority higher than the default of 10 because this filter is also added in the auto upgrade Gravity Forms code and the list of updates will not be complete unless the filter in the GF code runs before your added filter.

add_filter( 'gform_updates_list', 'your_function_name', 11, 1 );

Parameters

ParameterTypeDescription
$updatesarrayAn array of plugins displayed on the Updates page.

Example

This example removes a plugin from the list of available updates.

Remove a plugin from the list of available updates.

add_filter( 'gform_updates_list', 'remove_update', 11, 1 );

function remove_update( $updates ){
	//remove user registration from the updates list
	foreach( $updates as $id => $update ){
		//loop through array and create ids for the sub arrays
		//so the user registration plugin can be removed
		if ( $update['slug'] == 'gravityformsuserregistration' ){
			//remove it from the main array
			unset( $updates[$id] );
			break;
		}
	}

	return $updates;
}

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?

Since

This filter was added in v2.2.

Source Code

This filter is located in GF_Update::available_updates() in gravityforms/includes/system-status/class-gf-update.php.