From a398c298c3b70ea74f6596601c31985c6fe3a66d Mon Sep 17 00:00:00 2001 From: Damian Regan Date: Thu, 21 Feb 2013 16:53:09 +0000 Subject: [PATCH 1/4] Root relative URLs --- lib/cleanup.php | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/lib/cleanup.php b/lib/cleanup.php index b2c66cb..903412c 100644 --- a/lib/cleanup.php +++ b/lib/cleanup.php @@ -124,6 +124,9 @@ add_filter('body_class', 'roots_body_class'); * @author Scott Walkinshaw */ function roots_root_relative_url($input) { + if(!is_admin()) { + $input = str_replace(site_url(), "", $input); + } $output = preg_replace_callback( '!(https?://[^/|"]+)([^"]+)?!', create_function( @@ -141,23 +144,6 @@ function roots_root_relative_url($input) { return $output; } -/** - * Terrible workaround to remove the duplicate subfolder in the src of