diff --git a/lib/cleanup.php b/lib/cleanup.php index b2c66cb..7c49a0d 100644 --- a/lib/cleanup.php +++ b/lib/cleanup.php @@ -124,6 +124,11 @@ add_filter('body_class', 'roots_body_class'); * @author Scott Walkinshaw */ function roots_root_relative_url($input) { + // fix for site_url != home_url() + if(!is_admin() && site_url() != home_url()) { + $input = str_replace(site_url(), "", $input); + } + $output = preg_replace_callback( '!(https?://[^/|"]+)([^"]+)?!', create_function( @@ -137,22 +142,12 @@ function roots_root_relative_url($input) { ), $input ); - - return $output; -} - -/** - * Terrible workaround to remove the duplicate subfolder in the src of