Created
February 19, 2016 21:44
-
-
Save szbl/c62bce9adb2d2de5460f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function szbl_ssl_srcset_fix( $src_list ) | |
{ | |
foreach ( $src_list as $k => $src ) { | |
$src_list[ $k ]['url'] = set_url_scheme( $src['url'], 'https' ); | |
} | |
return $src_list; | |
} | |
add_filter( 'wp_calculate_image_srcset', 'szbl_ssl_srcset_fix' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment