From 5f476a9f03557fd7a596381ee009c5d0caeb9dd1 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Thu, 7 Apr 2011 09:56:20 +0000 Subject: [PATCH] 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 --- wp-includes/update.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/update.php b/wp-includes/update.php index 1f9f2a9a66..e8f32cb9a8 100644 --- a/wp-includes/update.php +++ b/wp-includes/update.php @@ -280,11 +280,11 @@ function wp_update_themes( ) { $new_update = new stdClass; $new_update->last_checked = time( ); + $new_update->checked = $checked; + $response = unserialize( $raw_response['body'] ); - if ( $response ) { - $new_update->checked = $checked; + if ( false !== $response ) $new_update->response = $response; - } set_site_transient( 'update_themes', $new_update ); }