diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php index 473ec61575..8230feb27e 100644 --- a/wp-admin/update-core.php +++ b/wp-admin/update-core.php @@ -143,6 +143,12 @@ function list_plugin_updates() { if ( empty($plugins) ) return; $form_action = 'update-core.php?action=do-plugin-upgrade'; + + $core_updates = get_core_updates(); + if ( !isset($core_updates[0]->response) || 'latest' == $core_updates[0]->response || 'development' == $core_updates[0]->response ) + $core_update_version = false; + else + $core_update_version = $core_updates[0]->current; ?>

@@ -167,12 +173,23 @@ function list_plugin_updates() { $plugin_data) { $info = plugins_api('plugin_information', array('slug' => $plugin_data->update->slug )); + // Get plugin compat for running version of WordPress. if ( isset($info->compatibility[$cur_wp_version][$plugin_data->update->new_version]) ) { $compat = $info->compatibility[$cur_wp_version][$plugin_data->update->new_version]; - $compat = ' ' . sprintf(__('Compatibility: %1$d%% (%2$d "works" votes out of %3$d total)'), $compat[0], $compat[2], $compat[1]); + $compat = '
' . sprintf(__('Compatibility with WordPress %1$s: %2$d%% (%3$d "works" votes out of %4$d total)'), $cur_wp_version, $compat[0], $compat[2], $compat[1]); } else { - $compat = ''; + $compat = '
' . sprintf(__('Compatibility with WordPress %1$s: Unknown)'), $cur_wp_version); } + // Get plugin compat for updated version of WordPress. + if ( $core_update_version ) { + if ( isset($info->compatibility[$core_update_version][$plugin_data->update->new_version]) ) { + $update_compat = $info->compatibility[$core_update_version][$plugin_data->update->new_version]; + $compat .= '
' . sprintf(__('Compatibility with WordPress %1$s: %2$d%% (%3$d "works" votes out of %4$d total)'), $core_update_version, $update_compat[0], $update_compat[2], $update_compat[1]); + } else { + $compat .= '
' . sprintf(__('Compatibility with WordPress %1$s: Unknown'), $core_update_version); + } + } + // Get the upgrade notice for the new plugin version. if ( isset($plugin_data->update->upgrade_notice) ) { $upgrade_notice = '
' . strip_tags($plugin_data->update->upgrade_notice); } else {