_maybe_update_themes

The timeline below displays how wordpress function _maybe_update_themes has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Checks 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.
 *
 * @since 2.7.0
 * @access private
 */
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();
}

WordPress Version: 3.7

/**
 * 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.
 *
 * @since 2.7.0
 * @access private
 */
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();
}