Thread Starter
alfupe
(@alfupe)
Using the msls_options_get_permalink filter from http://msls.co/hooks-filters-and-actions/ I was able to make a little tweak to make it work again.
/**
* Hack para mapear a mano la url del blog
*
* @param string $language
* @return string
*/
function my_msls_options_get_permalink( $url ) {
if ( endsWith(get_the_permalink(), "blog/") ) {
$url .= "blog/";
}
return $url;
}
add_filter( 'msls_options_get_permalink', 'my_msls_options_get_permalink', 10, 2 );
function endsWith($haystack, $needle)
{
$length = strlen($needle);
if ($length == 0) {
return true;
}
return (substr($haystack, -$length) === $needle);
}