Changeset 20752
- Timestamp:
- 05/09/2012 03:55:59 PM (12 years ago)
- Location:
- trunk/wp-admin/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin-install.php
r20675 r20752 44 44 $request = wp_remote_post('http://api.wordpress.org/plugins/info/1.0/', array( 'timeout' => 15, 'body' => array('action' => $action, 'request' => serialize($args))) ); 45 45 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. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ), $request->get_error_message() ); 47 47 } else { 48 48 $res = maybe_unserialize( wp_remote_retrieve_body( $request ) ); 49 49 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. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ), wp_remote_retrieve_body( $request ) ); 51 51 } 52 52 } elseif ( !is_wp_error($res) ) { -
trunk/wp-admin/includes/theme.php
r20733 r20752 284 284 $request = wp_remote_post('http://api.wordpress.org/themes/info/1.0/', array( 'body' => array('action' => $action, 'request' => serialize($args))) ); 285 285 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. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ), $request->get_error_message() ); 287 287 } else { 288 288 $res = maybe_unserialize( wp_remote_retrieve_body( $request ) ); 289 289 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. If you continue to have problems, please try the <a href="http://wordpress.org/support/">support forums</a>.' ), wp_remote_retrieve_body( $request ) ); 291 291 } 292 292 }
Note: See TracChangeset
for help on using the changeset viewer.