summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/functions.photon.php')
-rw-r--r--plugins/jetpack/functions.photon.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/jetpack/functions.photon.php b/plugins/jetpack/functions.photon.php
index 066eb6f7..419b8b55 100644
--- a/plugins/jetpack/functions.photon.php
+++ b/plugins/jetpack/functions.photon.php
@@ -62,10 +62,6 @@ function jetpack_photon_url( $image_url, $args = array(), $scheme = null ) {
if ( ! is_array( $image_url_parts ) || empty( $image_url_parts['host'] ) || empty( $image_url_parts['path'] ) )
return $image_url;
- if ( isset( $image_url_parts['scheme'] ) && 'https' == $image_url_parts['scheme'] ) {
- $args['ssl'] = '1';
- }
-
if ( is_array( $args ) ){
// Convert values that are arrays into strings
foreach ( $args as $arg => $value ) {
@@ -160,6 +156,10 @@ function jetpack_photon_url( $image_url, $args = array(), $scheme = null ) {
}
}
+ if ( isset( $image_url_parts['scheme'] ) && 'https' == $image_url_parts['scheme'] ) {
+ $photon_url = add_query_arg( array( 'ssl' => 1 ), $photon_url );
+ }
+
return jetpack_photon_url_scheme( $photon_url, $scheme );
}
add_filter( 'jetpack_photon_url', 'jetpack_photon_url', 10, 3 );