mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 03:34:33 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user