WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/09/2013 07:53:15 AM (6 years ago)
Author:
dd32
Message:

Switch to using HTTPS connections for Plugin and Theme API requests when SSL is available. See #18577

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/update.php

    r25220 r25308  
    7777
    7878    $url = 'http://api.wordpress.org/core/version-check/1.7/?' . http_build_query( $query, null, '&' );
    79 
    8079    if ( wp_http_supports( array( 'ssl' ) ) )
    8180        $url = set_url_scheme( $url, 'https' );
     
    206205    );
    207206
    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 );
    209212
    210213    if ( is_wp_error( $raw_response ) || 200 != wp_remote_retrieve_response_code( $raw_response ) )
     
    311314    );
    312315
    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 );
    314321
    315322    if ( is_wp_error( $raw_response ) || 200 != wp_remote_retrieve_response_code( $raw_response ) )
Note: See TracChangeset for help on using the changeset viewer.