wpseek.com
A WordPress-centric search engine for devs and theme authors
get_plugin_updates › WordPress Function
Since2.9.0
Deprecatedn/a
› get_plugin_updates ( No parameters )
Returns: |
|
Defined at: |
|
Codex: |
Retrieves plugins with updates available.
Related Functions: list_plugin_updates, get_plugin_data, wp_plugin_update_rows, get_plugin_files, get_plugins
Source
function get_plugin_updates() { $all_plugins = get_plugins(); $upgrade_plugins = array(); $current = get_site_transient( 'update_plugins' ); foreach ( (array) $all_plugins as $plugin_file => $plugin_data ) { if ( isset( $current->response[ $plugin_file ] ) ) { $upgrade_plugins[ $plugin_file ] = (object) $plugin_data; $upgrade_plugins[ $plugin_file ]->update = $current->response[ $plugin_file ]; } } return $upgrade_plugins; }