WordPress.org

Make WordPress Core

Ticket #25692: 25692theme.diff

File 25692theme.diff, 1.5 KB (added by DaveAl, 7 years ago)
  • theme.php

     
    282282        $res = apply_filters('themes_api', false, $action, $args); //NOTE: Allows a theme to completely override the builtin WordPress.org API.
    283283
    284284        if ( ! $res ) {
    285                 $url = 'http://api.wordpress.org/themes/info/1.0/';
     285                $url = 'http://api.wordpress.org/themes/info/1.1/';
    286286                if ( wp_http_supports( array( 'ssl' ) ) )
    287287                        $url = set_url_scheme( $url, 'https' );
    288288
     
    296296                if ( is_wp_error($request) ) {
    297297                        $res = new WP_Error('themes_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() );
    298298                } else {
    299                         $res = maybe_unserialize( wp_remote_retrieve_body( $request ) );
     299                        $res = json_decode( wp_remote_retrieve_body( $request ) );
    300300                        if ( ! is_object( $res ) && ! is_array( $res ) )
    301301                                $res = new WP_Error('themes_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 ) );
    302302                }