WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/09/2012 03:55:59 PM (8 years ago)
Author:
ryan
Message:

Friendlier strings with links to the support forums when experiencing problems talking to api.wordpress.org. fixes #20605

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/plugin-install.php

    r20675 r20752  
    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&#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() );
    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&#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 ) );
    5151        }
    5252    } elseif ( !is_wp_error($res) ) {
Note: See TracChangeset for help on using the changeset viewer.