153 | | if ( $ssl && is_wp_error( $response ) ) { |
154 | | trigger_error( |
155 | | sprintf( |
156 | | /* translators: %s: support forums URL */ |
157 | | __( '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>.' ), |
158 | | __( 'https://wordpress.org/support/' ) |
159 | | ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), |
160 | | headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE |
161 | | ); |
162 | | $response = wp_remote_post( $http_url, $options ); |
163 | | } |
| 153 | $response=error_trigger($response,$ssl,$options); |
377 | | if ( $ssl && is_wp_error( $raw_response ) ) { |
378 | | trigger_error( |
379 | | sprintf( |
380 | | /* translators: %s: support forums URL */ |
381 | | __( '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>.' ), |
382 | | __( 'https://wordpress.org/support/' ) |
383 | | ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), |
384 | | headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE |
385 | | ); |
386 | | $raw_response = wp_remote_post( $http_url, $options ); |
387 | | } |
| 367 | $response=error_trigger($response,$ssl,$options); |
562 | | if ( $ssl && is_wp_error( $raw_response ) ) { |
563 | | trigger_error( |
564 | | sprintf( |
565 | | /* translators: %s: support forums URL */ |
566 | | __( '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>.' ), |
567 | | __( 'https://wordpress.org/support/' ) |
568 | | ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), |
569 | | headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE |
570 | | ); |
571 | | $raw_response = wp_remote_post( $http_url, $options ); |
572 | | } |
| 542 | $response=error_trigger($response,$ssl,$options); |
| 775 | function error_trigger($raw_response,$ssl,$options) |
| 776 | { |
| 777 | $http_url = 'http://api.wordpress.org/themes/update-check/1.1/'; |
| 778 | if ( $ssl && is_wp_error( $raw_response ) ) { |
| 779 | trigger_error( |
| 780 | sprintf( |
| 781 | /* translators: %s: support forums URL */ |
| 782 | __( '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>.' ), |
| 783 | __( 'https://wordpress.org/support/' ) |
| 784 | ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), |
| 785 | headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE |
| 786 | ); |
| 787 | $raw_response = wp_remote_post( $http_url, $options ); |
| 788 | return $raw_response; |
| 789 | } |
| 790 | } |
| 791 | |