Changeset 39325 for trunk/src/wp-admin/includes/theme.php
- Timestamp:
- 11/21/2016 01:51:39 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/theme.php
r39140 r39325 463 463 if ( $ssl && is_wp_error( $request ) ) { 464 464 if ( ! wp_doing_ajax() ) { 465 trigger_error( __( '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="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE ); 465 trigger_error( 466 sprintf( 467 /* translators: %s: support forums URL */ 468 __( '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="%s">support forums</a>.' ), 469 __( 'https://wordpress.org/support/' ) 470 ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), 471 headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE 472 ); 466 473 } 467 474 $request = wp_remote_post( $http_url, $http_args ); … … 469 476 470 477 if ( is_wp_error($request) ) { 471 $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="https://wordpress.org/support/">support forums</a>.' ), $request->get_error_message() ); 478 $res = new WP_Error( 'themes_api_failed', 479 sprintf( 480 /* translators: %s: support forums URL */ 481 __( '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="%s">support forums</a>.' ), 482 __( 'https://wordpress.org/support/' ) 483 ), 484 $request->get_error_message() 485 ); 472 486 } else { 473 487 $res = maybe_unserialize( wp_remote_retrieve_body( $request ) ); 474 if ( ! is_object( $res ) && ! is_array( $res ) ) 475 $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="https://wordpress.org/support/">support forums</a>.' ), wp_remote_retrieve_body( $request ) ); 488 if ( ! is_object( $res ) && ! is_array( $res ) ) { 489 $res = new WP_Error( 'themes_api_failed', 490 sprintf( 491 /* translators: %s: support forums URL */ 492 __( '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="%s">support forums</a>.' ), 493 __( 'https://wordpress.org/support/' ) 494 ), 495 wp_remote_retrieve_body( $request ) 496 ); 497 } 476 498 } 477 499 }
Note: See TracChangeset
for help on using the changeset viewer.