From 065c684cea3d26d80060b26f16470694b14313ad Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 16 Dec 2009 03:08:17 +0000 Subject: [PATCH] Consult the tested field when checking plugin compatibility. Props Denis-de-Bernardy. fixes #11450 git-svn-id: https://develop.svn.wordpress.org/trunk@12413 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/update-core.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php index 8230feb27e..d636269171 100644 --- a/wp-admin/update-core.php +++ b/wp-admin/update-core.php @@ -174,7 +174,9 @@ function list_plugin_updates() { foreach ( (array) $plugins as $plugin_file => $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]) ) { + if ( isset($info->tested) && version_compare($info->tested, $cur_wp_version, '>=') ) { + $compat = '
' . sprintf(__('Compatibility with WordPress %1$s: 100% (according to its author)'), $cur_wp_version); + } elseif ( 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 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 {