WordPress.org

Make WordPress Core

Ticket #11450: 11450.diff

File 11450.diff, 1.1 KB (added by Denis-de-Bernardy, 4 years ago)
  • wp-admin/update-core.php

     
    174174        foreach ( (array) $plugins as $plugin_file => $plugin_data) { 
    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]); 
    180182                } else {