From 197e081e19b0945a48352ac6df400cd75b0dff35 Mon Sep 17 00:00:00 2001 From: dd32 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: http://svn.automattic.com/wordpress/trunk@17618 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 1f9f2a9a6..e8f32cb9a 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 ); }