get_theme_updates()
Retrieves themes with updates available.
No Hooks.
Returns
Array
Usage
get_theme_updates();
Changelog
| Since 2.9.0 | Introduced. |
get_theme_updates() get theme updates code WP 7.0
function get_theme_updates() {
$current = get_site_transient( 'update_themes' );
if ( ! isset( $current->response ) ) {
return array();
}
$update_themes = array();
foreach ( $current->response as $stylesheet => $data ) {
$update_themes[ $stylesheet ] = wp_get_theme( $stylesheet );
$update_themes[ $stylesheet ]->update = $data;
}
return $update_themes;
}