wp_get_update_data

Filters the returned array of update data for plugins, themes, and WordPress core.

Description

apply_filters( 'wp_get_update_data', (array) $update_data, (array) $titles ); 

Parameters (2)

0. $update_data (array)
1. $titles (array)
An array of update counts and UI strings for available updates.

Usage

To run the hook, copy the example below.
  1. $update_data = apply_filters( 'wp_get_update_data', $update_data, $titles ); 
  2.  
  3. if ( !empty( $update_data ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the wp_get_update_data callback 
  2. function filter_wp_get_update_data( $update_data, $titles ) { 
  3. // make filter magic happen here... 
  4. return $update_data
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'wp_get_update_data', 'filter_wp_get_update_data', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'wp_get_update_data', 'filter_wp_get_update_data', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-includes/update.php  
  1. return apply_filters( 'wp_get_update_data', $update_data, $titles );