Ticket #25692: 25692theme.diff
File 25692theme.diff, 1.5 KB (added by , 10 years ago) |
---|
-
theme.php
282 282 $res = apply_filters('themes_api', false, $action, $args); //NOTE: Allows a theme to completely override the builtin WordPress.org API. 283 283 284 284 if ( ! $res ) { 285 $url = 'http://api.wordpress.org/themes/info/1. 0/';285 $url = 'http://api.wordpress.org/themes/info/1.1/'; 286 286 if ( wp_http_supports( array( 'ssl' ) ) ) 287 287 $url = set_url_scheme( $url, 'https' ); 288 288 … … 296 296 if ( is_wp_error($request) ) { 297 297 $res = new WP_Error('themes_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() ); 298 298 } else { 299 $res = maybe_unserialize( wp_remote_retrieve_body( $request ) );299 $res = json_decode( wp_remote_retrieve_body( $request ) ); 300 300 if ( ! is_object( $res ) && ! is_array( $res ) ) 301 301 $res = new WP_Error('themes_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 ) ); 302 302 }