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, 6 insertions, 2 deletions
diff --git a/plugins/jetpack/functions.photon.php b/plugins/jetpack/functions.photon.php
index 4566e311..066eb6f7 100644
--- a/plugins/jetpack/functions.photon.php
+++ b/plugins/jetpack/functions.photon.php
@@ -39,7 +39,7 @@ function jetpack_photon_url( $image_url, $args = array(), $scheme = null ) {
* @param array|string $args Array of Photon arguments.
* @param string|null $scheme Image scheme. Default to null.
*/
- $image_url = apply_filters( 'jetpack_photon_pre_image_url', $image_url, $args, $scheme );
+ $image_url = apply_filters( 'jetpack_photon_pre_image_url', $image_url, $args, $scheme );
/**
* Filter the original Photon image parameters before Photon is applied to an image.
*
@@ -51,7 +51,7 @@ function jetpack_photon_url( $image_url, $args = array(), $scheme = null ) {
* @param string $image_url Image URL.
* @param string|null $scheme Image scheme. Default to null.
*/
- $args = apply_filters( 'jetpack_photon_pre_args', $args, $image_url, $scheme );
+ $args = apply_filters( 'jetpack_photon_pre_args', $args, $image_url, $scheme );
if ( empty( $image_url ) )
return $image_url;
@@ -62,6 +62,10 @@ 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 ) {