Changeset 25308 for trunk/src/wp-admin/includes/plugin-install.php
- Timestamp:
- 09/09/2013 07:53:15 AM (12 years ago)
- File:
-
- 1 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() );
Note: See TracChangeset
for help on using the changeset viewer.