WordPress.org

Make WordPress Core

Ticket #25692: 25692plugin-install.diff

File 25692plugin-install.diff, 1.4 KB (added by DaveAl, 7 years ago)
  • plugin-install.php

     
    6060        $res = apply_filters( 'plugins_api', false, $action, $args );
    6161
    6262        if ( false === $res ) {
    63                 $url = 'http://api.wordpress.org/plugins/info/1.0/';
     63                $url = 'http://api.wordpress.org/plugins/info/1.1/';
    6464                if ( wp_http_supports( array( 'ssl' ) ) )
    6565                        $url = set_url_scheme( $url, 'https' );
    6666
     
    7575                if ( is_wp_error($request) ) {
    7676                        $res = new WP_Error('plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ), $request->get_error_message() );
    7777                } else {
    78                         $res = maybe_unserialize( wp_remote_retrieve_body( $request ) );
     78                        $res = json_decode( wp_remote_retrieve_body( $request ) );
    7979                        if ( ! is_object( $res ) && ! is_array( $res ) )
    8080                                $res = new WP_Error('plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ), wp_remote_retrieve_body( $request ) );
    8181                }