Last active
December 15, 2016 04:09
-
-
Save LouWii/11b7cd3d5ced40366115 to your computer and use it in GitHub Desktop.
Revisions
-
LouWii revised this gist
Jan 5, 2016 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,10 @@ //Add this code to the end of the functions.php file of your wordpress theme // This forces images urls and links of your website to be displayed with https function force_https_the_content($content) { if ( is_ssl() ) { $content = str_replace( 'src="http://my-domain.tld', 'src="https://my-domain.tld', $content ); $content = str_replace( 'href="http://my-domain.tld', 'href="https://my-domain.tld', $content ); } return $content; } -
LouWii created this gist
Jan 5, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ //Custom to handle embedded content without https function force_https_the_content($content) { if ( is_ssl() ) { $content = str_replace( 'src="http://canada.with.susie.and.louwii.fr', 'src="https://canada.with.susie.and.louwii.fr', $content ); $content = str_replace( 'href="http://canada.with.susie.and.louwii.fr', 'href="https://canada.with.susie.and.louwii.fr', $content ); } return $content; } add_filter('the_content', 'force_https_the_content');