From 753d771e22fd20edf93bf310c9cbfaf6f1925f67 Mon Sep 17 00:00:00 2001 From: leho Date: Fri, 25 Apr 2014 03:48:32 -0400 Subject: [PATCH] Protocol-relative links for minify endpoints, fixes #50 we are currently using get_option( "home" ) to build the $src address. wordpress does not support protocol relative home address still as of 3.9, see https://core.trac.wordpress.org/ticket/21153 --- dependency-minification.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependency-minification.php b/dependency-minification.php index bd2e385..9e83835 100644 --- a/dependency-minification.php +++ b/dependency-minification.php @@ -512,7 +512,7 @@ static function get_dependency_minified_url( array $deps, $type ) { $ver_hash, $type === 'scripts' ? 'js' : 'css', ) ); - return $src; + return preg_replace( '#^https?:(?=//)#', '', $src ); } /**