Created
February 22, 2014 16:02
-
-
Save dejanmarkovic/9157151 to your computer and use it in GitHub Desktop.
Mixed Content Fixer
This file contains 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 | |
/* Plugin Name: Mixed Content Fixer | |
* Description: This simple plug-in is replacing the url's in content from http to https. | |
* Author: Leo Seccia & Dejan Markovic | |
* Version: 2014.1.0 | |
*/ | |
add_filter('the_content', 'content_fix'); | |
function content_fix($content) | |
{ | |
if (is_ssl()) { | |
return str_replace("http://", "https://", $content); | |
} | |
else | |
{ | |
return $content; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment