Browse Source

force ssl on oembed

windhamdavid 10 years ago
parent
commit
2bbd26ef42
1 changed files with 5 additions and 0 deletions
  1. 5 0
      inc/tweaks.php

+ 5 - 0
inc/tweaks.php

@@ -42,4 +42,9 @@ function dw_oembed_filter($html, $url, $attr, $post_ID) {
 }
 add_filter( 'embed_oembed_html', 'dw_oembed_filter', 10, 4 ) ;
 
+function dw_embed_oembed_html( $html ) {
+    return preg_replace( '@src="https?:@', 'src="', $html );
+}
+add_filter( 'embed_oembed_html', 'dw_embed_oembed_html' );
+
 ?>