Skip to content

Instantly share code, notes, and snippets.

@jazbek
Created November 15, 2013 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jazbek/7491289 to your computer and use it in GitHub Desktop.
Save jazbek/7491289 to your computer and use it in GitHub Desktop.
Fix google maps on https
<?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;
}
@xeoncross
Copy link

Actually, just set the path to // and the browser will pick the right protocol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment