Skip to content

Commit

Permalink
Photon: Default to HTTPS (#5534)
Browse files Browse the repository at this point in the history
* Photon: Default to HTTPS

* Photon: Update docblock for jetpack_photon_domain filter to HTTPS
  • Loading branch information
aduth authored and samhotchkiss committed Nov 8, 2016
1 parent c913294 commit 0fa10d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions functions.photon.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ function jetpack_photon_url( $image_url, $args = array(), $scheme = null ) {
*
* @since 3.4.2
*
* @param string http://i{$subdomain}.wp.com Domain used by Photon. $subdomain is a random number between 0 and 2.
* @param string https://i{$subdomain}.wp.com Domain used by Photon. $subdomain is a random number between 0 and 2.
* @param string $image_url URL of the image to be photonized.
*/
$photon_domain = apply_filters( 'jetpack_photon_domain', "http://i{$subdomain}.wp.com", $image_url );
$photon_domain = apply_filters( 'jetpack_photon_domain', "https://i{$subdomain}.wp.com", $image_url );
$photon_domain = trailingslashit( esc_url( $photon_domain ) );
$photon_url = $photon_domain . $image_host_path;

Expand Down Expand Up @@ -235,7 +235,7 @@ function jetpack_photon_parse_wpcom_query_args( $args, $image_url ) {

function jetpack_photon_url_scheme( $url, $scheme ) {
if ( ! in_array( $scheme, array( 'http', 'https', 'network_path' ) ) ) {
$scheme = is_ssl() ? 'https' : 'http';
$scheme = 'https';
}

if ( 'network_path' == $scheme ) {
Expand Down

0 comments on commit 0fa10d4

Please sign in to comment.