Ticket #25692: 25692plugin-install.diff
File 25692plugin-install.diff, 1.4 KB (added by , 10 years ago) |
---|
-
plugin-install.php
60 60 $res = apply_filters( 'plugins_api', false, $action, $args ); 61 61 62 62 if ( false === $res ) { 63 $url = 'http://api.wordpress.org/plugins/info/1. 0/';63 $url = 'http://api.wordpress.org/plugins/info/1.1/'; 64 64 if ( wp_http_supports( array( 'ssl' ) ) ) 65 65 $url = set_url_scheme( $url, 'https' ); 66 66 … … 75 75 if ( is_wp_error($request) ) { 76 76 $res = new WP_Error('plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ), $request->get_error_message() ); 77 77 } else { 78 $res = maybe_unserialize( wp_remote_retrieve_body( $request ) );78 $res = json_decode( wp_remote_retrieve_body( $request ) ); 79 79 if ( ! is_object( $res ) && ! is_array( $res ) ) 80 80 $res = new WP_Error('plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’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 ) ); 81 81 }