WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/16/2009 03:08:17 AM (11 years ago)
Author:
ryan
Message:

Consult the tested field when checking plugin compatibility. Props Denis-de-Bernardy. fixes #11450

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/update-core.php

    r12407 r12413  
    175175        $info = plugins_api('plugin_information', array('slug' => $plugin_data->update->slug ));
    176176        // Get plugin compat for running version of WordPress.
    177         if ( isset($info->compatibility[$cur_wp_version][$plugin_data->update->new_version]) ) {
     177        if ( isset($info->tested) && version_compare($info->tested, $cur_wp_version, '>=') ) {
     178            $compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: 100% (according to its author)'), $cur_wp_version);
     179        } elseif ( isset($info->compatibility[$cur_wp_version][$plugin_data->update->new_version]) ) {
    178180            $compat = $info->compatibility[$cur_wp_version][$plugin_data->update->new_version];
    179181            $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]);
Note: See TracChangeset for help on using the changeset viewer.