Changeset 39325
- Timestamp:
- 11/21/2016 01:51:39 AM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/plugin-install.php
r38953 r39325 156 156 157 157 if ( $ssl && is_wp_error( $request ) ) { 158 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 ); 158 trigger_error( 159 sprintf( 160 /* translators: %s: support forums URL */ 161 __( '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>.' ), 162 __( 'https://wordpress.org/support/' ) 163 ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), 164 headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE 165 ); 159 166 $request = wp_remote_post( $http_url, $http_args ); 160 167 } 161 168 162 169 if ( is_wp_error($request) ) { 163 $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="https://wordpress.org/support/">support forums</a>.' ), $request->get_error_message() ); 170 $res = new WP_Error( 'plugins_api_failed', 171 sprintf( 172 /* translators: %s: support forums URL */ 173 __( '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>.' ), 174 __( 'https://wordpress.org/support/' ) 175 ), 176 $request->get_error_message() 177 ); 164 178 } else { 165 179 $res = maybe_unserialize( wp_remote_retrieve_body( $request ) ); 166 if ( ! is_object( $res ) && ! is_array( $res ) ) 167 $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="https://wordpress.org/support/">support forums</a>.' ), wp_remote_retrieve_body( $request ) ); 180 if ( ! is_object( $res ) && ! is_array( $res ) ) { 181 $res = new WP_Error( 'plugins_api_failed', 182 sprintf( 183 /* translators: %s: support forums URL */ 184 __( '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>.' ), 185 __( 'https://wordpress.org/support/' ) 186 ), 187 wp_remote_retrieve_body( $request ) 188 ); 189 } 168 190 } 169 191 } elseif ( !is_wp_error($res) ) { -
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 } -
trunk/src/wp-admin/includes/translation-install.php
r38470 r39325 57 57 58 58 if ( $ssl && is_wp_error( $request ) ) { 59 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 ); 59 trigger_error( 60 sprintf( 61 /* translators: %s: support forums URL */ 62 __( '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>.' ), 63 __( 'https://wordpress.org/support/' ) 64 ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), 65 headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE 66 ); 60 67 61 68 $request = wp_remote_post( $http_url, $options ); … … 63 70 64 71 if ( is_wp_error( $request ) ) { 65 $res = new WP_Error( 'translations_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() ); 72 $res = new WP_Error( 'translations_api_failed', 73 sprintf( 74 /* translators: %s: support forums URL */ 75 __( '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>.' ), 76 __( 'https://wordpress.org/support/' ) 77 ), 78 $request->get_error_message() 79 ); 66 80 } else { 67 81 $res = json_decode( wp_remote_retrieve_body( $request ), true ); 68 82 if ( ! is_object( $res ) && ! is_array( $res ) ) { 69 $res = new WP_Error( 'translations_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 ) ); 83 $res = new WP_Error( 'translations_api_failed', 84 sprintf( 85 /* translators: %s: support forums URL */ 86 __( '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>.' ), 87 __( 'https://wordpress.org/support/' ) 88 ), 89 wp_remote_retrieve_body( $request ) 90 ); 70 91 } 71 92 } -
trunk/src/wp-admin/includes/update.php
r39323 r39325 113 113 $response = wp_remote_get( $url, $options ); 114 114 if ( $ssl && is_wp_error( $response ) ) { 115 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 ); 115 trigger_error( 116 sprintf( 117 /* translators: %s: support forums URL */ 118 __( '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>.' ), 119 __( 'https://wordpress.org/support/' ) 120 ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), 121 headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE 122 ); 116 123 $response = wp_remote_get( $http_url, $options ); 117 124 } -
trunk/src/wp-admin/theme-install.php
r38722 r39325 49 49 'upload' => __( 'Upload Theme' ), 50 50 'back' => __( 'Back' ), 51 '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>.' ), 51 'error' => sprintf( 52 /* translators: %s: support forums URL */ 53 __( '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>.' ), 54 __( 'https://wordpress.org/support/' ) 55 ), 52 56 'themesFound' => __( 'Number of Themes found: %d' ), 53 57 'noThemesFound' => __( 'No themes found. Try a different search.' ), -
trunk/src/wp-includes/update.php
r38470 r39325 121 121 $response = wp_remote_post( $url, $options ); 122 122 if ( $ssl && is_wp_error( $response ) ) { 123 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 ); 123 trigger_error( 124 sprintf( 125 /* translators: %s: support forums URL */ 126 __( '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>.' ), 127 __( 'https://wordpress.org/support/' ) 128 ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), 129 headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE 130 ); 124 131 $response = wp_remote_post( $http_url, $options ); 125 132 } … … 304 311 $raw_response = wp_remote_post( $url, $options ); 305 312 if ( $ssl && is_wp_error( $raw_response ) ) { 306 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 ); 313 trigger_error( 314 sprintf( 315 /* translators: %s: support forums URL */ 316 __( '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>.' ), 317 __( 'https://wordpress.org/support/' ) 318 ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), 319 headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE 320 ); 307 321 $raw_response = wp_remote_post( $http_url, $options ); 308 322 } … … 477 491 $raw_response = wp_remote_post( $url, $options ); 478 492 if ( $ssl && is_wp_error( $raw_response ) ) { 479 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 ); 493 trigger_error( 494 sprintf( 495 /* translators: %s: support forums URL */ 496 __( '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>.' ), 497 __( 'https://wordpress.org/support/' ) 498 ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), 499 headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE 500 ); 480 501 $raw_response = wp_remote_post( $http_url, $options ); 481 502 }
Note: See TracChangeset
for help on using the changeset viewer.