Plugins: Use api.wordpress.org/plugins/info/1.2/ for querying plugins & plugin information.

See #43192.
Fixes #29274.


git-svn-id: https://develop.svn.wordpress.org/trunk@42631 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2018-02-01 05:16:15 +00:00
parent cc9a5641a6
commit e0d5a8ac54
4 changed files with 47 additions and 60 deletions
-6
View File
@@ -277,9 +277,6 @@ foreach ( (array) $plugins as $plugin_file => $plugin_data ) {
// Get plugin compat for running version of WordPress.
if ( isset( $plugin_data->update->tested ) && version_compare( $plugin_data->update->tested, $cur_wp_version, '>=' ) ) {
$compat = '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: 100%% (according to its author)' ), $cur_wp_version );
} elseif ( isset( $plugin_data->update->compatibility->{$cur_wp_version} ) ) {
$compat = $plugin_data->update->compatibility->{$cur_wp_version};
$compat = '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: %2$d%% (%3$d "works" votes out of %4$d total)' ), $cur_wp_version, $compat->percent, $compat->votes, $compat->total_votes );
} else {
$compat = '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: Unknown' ), $cur_wp_version );
}
@@ -287,9 +284,6 @@ foreach ( (array) $plugins as $plugin_file => $plugin_data ) {
if ( $core_update_version ) {
if ( isset( $plugin_data->update->tested ) && version_compare( $plugin_data->update->tested, $core_update_version, '>=' ) ) {
$compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: 100%% (according to its author)' ), $core_update_version );
} elseif ( isset( $plugin_data->update->compatibility->{$core_update_version} ) ) {
$update_compat = $plugin_data->update->compatibility->{$core_update_version};
$compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: %2$d%% (%3$d "works" votes out of %4$d total)' ), $core_update_version, $update_compat->percent, $update_compat->votes, $update_compat->total_votes );
} else {
$compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %1$s: Unknown' ), $core_update_version );
}