Make WordPress Core

Ticket #20605: 20605.diff

File 20605.diff, 2.6 KB (added by ryan, 12 years ago)
  • wp-admin/includes/plugin-install.php

     
    4343        if ( false === $res ) {
    4444                $request = wp_remote_post('http://api.wordpress.org/plugins/info/1.0/', array( 'timeout' => 15, 'body' => array('action' => $action, 'request' => serialize($args))) );
    4545                if ( is_wp_error($request) ) {
    46                         $res = new WP_Error('plugins_api_failed', __('An Unexpected HTTP Error occurred during the API request.'), $request->get_error_message() );
     46                        $res = new WP_Error('plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration.' ), $request->get_error_message() );
    4747                } else {
    4848                        $res = maybe_unserialize( wp_remote_retrieve_body( $request ) );
    4949                        if ( ! is_object( $res ) && ! is_array( $res ) )
    50                                 $res = new WP_Error('plugins_api_failed', __('An unknown error occurred during the API request.'), wp_remote_retrieve_body( $request ) );
     50                                $res = new WP_Error('plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration.' ), wp_remote_retrieve_body( $request ) );
    5151                }
    5252        } elseif ( !is_wp_error($res) ) {
    5353                $res->external = true;
  • wp-admin/includes/theme.php

     
    283283        if ( ! $res ) {
    284284                $request = wp_remote_post('http://api.wordpress.org/themes/info/1.0/', array( 'body' => array('action' => $action, 'request' => serialize($args))) );
    285285                if ( is_wp_error($request) ) {
    286                         $res = new WP_Error('themes_api_failed', __('An Unexpected HTTP Error occurred during the API request.'), $request->get_error_message() );
     286                        $res = new WP_Error('themes_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration.' ), $request->get_error_message() );
    287287                } else {
    288288                        $res = maybe_unserialize( wp_remote_retrieve_body( $request ) );
    289289                        if ( ! is_object( $res ) && ! is_array( $res ) )
    290                                 $res = new WP_Error('themes_api_failed', __('An unknown error occurred during the API request.'), wp_remote_retrieve_body( $request ) );
     290                                $res = new WP_Error('themes_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration.' ), wp_remote_retrieve_body( $request ) );
    291291                }
    292292        }
    293293