Updates: Don't perform an API call to WordPress.org for every plugin update displayed. The API has been updated to return this information with the update response.

See #35301


git-svn-id: https://develop.svn.wordpress.org/trunk@36182 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2016-01-06 07:52:53 +00:00
parent e055e5b80e
commit 3e85247571
2 changed files with 15 additions and 31 deletions

View File

@@ -310,8 +310,14 @@ function wp_update_plugins( $extra_stats = array() ) {
$response = json_decode( wp_remote_retrieve_body( $raw_response ), true );
foreach ( $response['plugins'] as &$plugin ) {
$plugin = (object) $plugin;
if ( isset( $plugin->compatibility ) ) {
$plugin->compatibility = (object) $plugin->compatibility;
foreach ( $plugin->compatibility as &$data ) {
$data = (object) $data;
}
}
}
unset( $plugin );
unset( $plugin, $data );
foreach ( $response['no_update'] as &$plugin ) {
$plugin = (object) $plugin;
}