get_plugin_updates() WordPress Function
The get_plugin_updates() function is used to check for updates to plugins that are installed on a WordPress site. This function will return an array of plugin objects, each of which contains information about the latest version of the plugin and whether or not an update is available.
get_plugin_updates() #
Return
(array)
Source
File: wp-admin/includes/update.php
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; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.9.0 | Introduced. |