Uses
| Uses | Description |
|---|---|
| wp-includes/update.php: wp_update_themes() | Checks for available updates to themes based on the latest versions hosted on WordPress.org. |
| wp-includes/option.php: get_site_transient() | Retrieves the value of a site transient. |
This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
Check themes versions only after a duration of time.
This is for performance reasons to make sure that on the theme version checker is not run on every page load.
File: wp-includes/update.php
function _maybe_update_themes() {
$current = get_site_transient( 'update_themes' );
if ( isset( $current->last_checked )
&& 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked )
) {
return;
}
wp_update_themes();
} | Version | Description |
|---|---|
| 2.7.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/_maybe_update_themes