Created
November 15, 2013 20:47
-
-
Save jazbek/7491289 to your computer and use it in GitHub Desktop.
Fix google maps on https
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 | |
add_filter( 'tribe_get_embedded_map', 'tribe_fix_google_maps_https' ); | |
function tribe_fix_google_maps_https( $html ) { | |
if ( is_ssl() ) { | |
$html = str_replace( 'http://', 'https://', $html ); | |
} | |
return $html; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Actually, just set the path to
//
and the browser will pick the right protocol.