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
This commit is contained in:
Ryan Boren 2009-12-16 03:08:17 +00:00
parent 65551e22c3
commit 065c684cea

View File

@ -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 = '<br />' . 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 = '<br />' . 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 {