Ticket #29583: 29583.patch
File 29583.patch, 2.3 KB (added by , 10 years ago) |
---|
-
src/wp-admin/update-core.php
242 242 foreach ( (array) $plugins as $plugin_file => $plugin_data) { 243 243 $info = plugins_api('plugin_information', array('slug' => $plugin_data->update->slug )); 244 244 // Get plugin compat for running version of WordPress. 245 if ( isset( $info->tested) && version_compare($info->tested, $cur_wp_version, '>=') ) {245 if ( isset( $info->tested ) && version_compare( $info->tested, $cur_wp_version, '>=' ) ) { 246 246 $compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: 100%% (according to its author)'), $cur_wp_version); 247 } elseif ( isset( $info->compatibility[$cur_wp_version][$plugin_data->update->new_version]) ) {248 $compat = $info->compatibility[ $cur_wp_version][$plugin_data->update->new_version];247 } elseif ( isset( $info->compatibility ) && isset( $info->compatibility[ $cur_wp_version ][ $plugin_data->update->new_version ] ) ) { 248 $compat = $info->compatibility[ $cur_wp_version ][ $plugin_data->update->new_version ]; 249 249 $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]); 250 250 } else { 251 251 $compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: Unknown'), $cur_wp_version); … … 252 252 } 253 253 // Get plugin compat for updated version of WordPress. 254 254 if ( $core_update_version ) { 255 if ( isset( $info->compatibility[$core_update_version][$plugin_data->update->new_version]) ) {256 $update_compat = $info->compatibility[ $core_update_version][$plugin_data->update->new_version];255 if ( isset( $info->compatibility ) && isset( $info->compatibility[ $core_update_version ][ $plugin_data->update->new_version ] ) ) { 256 $update_compat = $info->compatibility[ $core_update_version ][ $plugin_data->update->new_version ]; 257 257 $compat .= '<br />' . 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]); 258 258 } else { 259 259 $compat .= '<br />' . sprintf(__('Compatibility with WordPress %1$s: Unknown'), $core_update_version);