Fill `$plugins['upgrade']` with extra info for use in list table

Shiny updates depends upon information from the update_plugins site transient in order to set data- attributes which are used by JavaScript. Since /wp-admin/plugins.php?plugin_status=upgrade uses `$plugin['upgrade']` rather than `$plugins['all']`, we need to fill that information in both places.   

Fixes #31738.


Built from https://develop.svn.wordpress.org/trunk@31872


git-svn-id: http://core.svn.wordpress.org/trunk@31851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Aaron Jorbin 2015-03-24 17:30:26 +00:00
parent 7c5fc2debb
commit 9c409e31f2
2 changed files with 10 additions and 1 deletions

View File

@ -125,8 +125,17 @@ class WP_Plugins_List_Table extends WP_List_Table {
// Extra info if known. array_merge() ensures $plugin_data has precedence if keys collide.
if ( isset( $plugin_info->response[ $plugin_file ] ) ) {
$plugins['all'][ $plugin_file ] = $plugin_data = array_merge( (array) $plugin_info->response[ $plugin_file ], $plugin_data );
// Make sure that $plugins['upgrade'] also recieves the extra info since it is used on ?plugin_status=upgrade
if (isset( $plugins['upgrade'][ $plugin_file ] ) ) {
$plugins['upgrade'][ $plugin_file ] = $plugin_data = array_merge( (array) $plugin_info->response[ $plugin_file ], $plugin_data );
}
} elseif ( isset( $plugin_info->no_update[ $plugin_file ] ) ) {
$plugins['all'][ $plugin_file ] = $plugin_data = array_merge( (array) $plugin_info->no_update[ $plugin_file ], $plugin_data );
// Make sure that $plugins['upgrade'] also recieves the extra info since it is used on ?plugin_status=upgrade
if (isset( $plugins['upgrade'][ $plugin_file ] ) ) {
$plugins['upgrade'][ $plugin_file ] = $plugin_data = array_merge( (array) $plugin_info->no_update[ $plugin_file ], $plugin_data );
}
}
// Filter into individual sections

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-beta2-31871';
$wp_version = '4.2-beta2-31872';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.