On this page
get_theme_updates(): array
Retrieves themes with updates available.
Return
array
Source
File: wp-admin/includes/update.php. View all references
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;
}
Related
Uses
| Uses | Description |
|---|---|
| get_site_transient() wp-includes/option.php | Retrieves the value of a site transient. |
| wp_get_theme() wp-includes/theme.php | Gets a WP_Theme object for a theme. |
Used By
| Used By | Description |
|---|---|
| WP_Debug_Data::debug_data() wp-admin/includes/class-wp-debug-data.php | Static function for generating site debug data when required. |
| WP_Site_Health::get_test_theme_version() wp-admin/includes/class-wp-site-health.php | Tests if themes are outdated, or unnecessary. |
| WP_Automatic_Updater::send_email() wp-admin/includes/class-wp-automatic-updater.php | Sends an email upon the completion or failure of a background core update. |
| list_theme_updates() wp-admin/update-core.php | Display the upgrade themes form. |
Changelog
| Version | Description |
|---|---|
| 2.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_theme_updates