Changeset 25308
- Timestamp:
- 09/09/2013 07:53:15 AM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/plugin-install.php
r25210 r25308 42 42 43 43 if ( false === $res ) { 44 $request = wp_remote_post('http://api.wordpress.org/plugins/info/1.0/', array( 'timeout' => 15, 'body' => array('action' => $action, 'request' => serialize($args))) ); 44 $url = 'http://api.wordpress.org/plugins/info/1.0/'; 45 if ( wp_http_supports( array( 'ssl' ) ) ) 46 $url = set_url_scheme( $url, 'https' ); 47 48 $request = wp_remote_post( $url, array( 49 'timeout' => 15, 50 'body' => array( 51 'action' => $action, 52 'request' => serialize( $args ) 53 ) 54 ) ); 55 45 56 if ( is_wp_error($request) ) { 46 57 $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() ); -
trunk/src/wp-admin/includes/theme.php
r24590 r25308 283 283 284 284 if ( ! $res ) { 285 $request = wp_remote_post('http://api.wordpress.org/themes/info/1.0/', array( 'body' => array('action' => $action, 'request' => serialize($args))) ); 285 $url = 'http://api.wordpress.org/themes/info/1.0/'; 286 if ( wp_http_supports( array( 'ssl' ) ) ) 287 $url = set_url_scheme( $url, 'https' ); 288 289 $request = wp_remote_post( $url, array( 290 'body' => array( 291 'action' => $action, 292 'request' => serialize( $args ) 293 ) 294 ) ); 295 286 296 if ( is_wp_error($request) ) { 287 297 $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() ); -
trunk/src/wp-includes/update.php
r25220 r25308 77 77 78 78 $url = 'http://api.wordpress.org/core/version-check/1.7/?' . http_build_query( $query, null, '&' ); 79 80 79 if ( wp_http_supports( array( 'ssl' ) ) ) 81 80 $url = set_url_scheme( $url, 'https' ); … … 206 205 ); 207 206 208 $raw_response = wp_remote_post('http://api.wordpress.org/plugins/update-check/1.0/', $options); 207 $url = 'http://api.wordpress.org/plugins/update-check/1.0/'; 208 if ( wp_http_supports( array( 'ssl' ) ) ) 209 $url = set_url_scheme( $url, 'https' ); 210 211 $raw_response = wp_remote_post( $url, $options ); 209 212 210 213 if ( is_wp_error( $raw_response ) || 200 != wp_remote_retrieve_response_code( $raw_response ) ) … … 311 314 ); 312 315 313 $raw_response = wp_remote_post( 'http://api.wordpress.org/themes/update-check/1.0/', $options ); 316 $url = 'http://api.wordpress.org/themes/update-check/1.0/'; 317 if ( wp_http_supports( array( 'ssl' ) ) ) 318 $url = set_url_scheme( $url, 'https' ); 319 320 $raw_response = wp_remote_post( $url, $options ); 314 321 315 322 if ( is_wp_error( $raw_response ) || 200 != wp_remote_retrieve_response_code( $raw_response ) )
Note: See TracChangeset
for help on using the changeset viewer.