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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user