That seems to be a bug. Would you mind to open an issue here?
I think that you could in the meanwhile hook into “msls_options_get_permalink” like in the following example:
<?php
/**
* @param string $postlink
* @param string $language
* @return string
*/
function my_msls_options_get_permalink( $url, $language ) {
if ( 'de_DE' != $language ) {
$url = str_replace( 'https://', 'http://', $url );
}
return $url;
}
add_filter( 'msls_options_get_permalink', 'my_msls_options_get_permalink', 10, 2 );
Thanks for the prompt response, I will do that now. So this code would go in MslsOptions.php? Would it override some of the code that is already there?
-
This reply was modified 9 years, 3 months ago by
peterbisset.
No code like this should stay in your functions.php. But be careful mine is just an example…
OK that works for all of the pages except the homepage of the https site still has https links. All of the internal pages are now fine!
-
This reply was modified 9 years, 3 months ago by
peterbisset.
There should be also an else with the first two parameters of str_replace switched.
Sorry php isn’t my strong point, where would I need to drop the else statement? And the else statement looks like this?
else ( ‘de_DE’ != $language ) {
$url = str_replace( ‘http://’, ‘https://’, $url );
}
-
This reply was modified 9 years, 3 months ago by
peterbisset.
If anyone else experiences this issue then here is a temporary fix from the Really Simple SSL plugin which fixes it too:
add_filter( 'home_url', 'rsssl_fix_https_urls' );
function rsssl_fix_https_urls($url, $path, $orig_scheme, $blog_id){
$ssl_enabled = false
$options = get_blog_option($blog_id, "rlrsssl_options");
if ($options && isset($options)) {
$site_has_ssl = isset($options['site_has_ssl']) ? $options['site_has_ssl'] : FALSE;
$ssl_enabled = isset($options['ssl_enabled']) ? $options['ssl_enabled'] : $site_has_ssl;
}
if (!$ssl_enabled) {
$url = str_replace("https://","http://",$url);
}
return $url;
}