Prevent update API requests on every load of themes.php when no updates are available. Fixes #16362
git-svn-id: https://develop.svn.wordpress.org/trunk@17618 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e849d6437d
commit
5f476a9f03
|
@ -280,11 +280,11 @@ function wp_update_themes( ) {
|
||||||
|
|
||||||
$new_update = new stdClass;
|
$new_update = new stdClass;
|
||||||
$new_update->last_checked = time( );
|
$new_update->last_checked = time( );
|
||||||
|
$new_update->checked = $checked;
|
||||||
|
|
||||||
$response = unserialize( $raw_response['body'] );
|
$response = unserialize( $raw_response['body'] );
|
||||||
if ( $response ) {
|
if ( false !== $response )
|
||||||
$new_update->checked = $checked;
|
|
||||||
$new_update->response = $response;
|
$new_update->response = $response;
|
||||||
}
|
|
||||||
|
|
||||||
set_site_transient( 'update_themes', $new_update );
|
set_site_transient( 'update_themes', $new_update );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue