diff --git a/wp-includes/class.wp-scripts.php b/wp-includes/class.wp-scripts.php index 0ac2af4d97..f75929b4ab 100644 --- a/wp-includes/class.wp-scripts.php +++ b/wp-includes/class.wp-scripts.php @@ -110,7 +110,7 @@ class WP_Scripts extends WP_Dependencies { } $this->print_extra_script( $handle ); - if ( !preg_match('|^https?://|', $src) && ! ( $this->content_url && 0 === strpos($src, $this->content_url) ) ) { + if ( !preg_match('|^(https?:)?//|', $src) && ! ( $this->content_url && 0 === strpos($src, $this->content_url) ) ) { $src = $this->base_url . $src; } diff --git a/wp-includes/class.wp-styles.php b/wp-includes/class.wp-styles.php index 48e8f7ef1d..fdfe5afe32 100644 --- a/wp-includes/class.wp-styles.php +++ b/wp-includes/class.wp-styles.php @@ -135,7 +135,7 @@ class WP_Styles extends WP_Dependencies { } function _css_href( $src, $ver, $handle ) { - if ( !is_bool($src) && !preg_match('|^https?://|', $src) && ! ( $this->content_url && 0 === strpos($src, $this->content_url) ) ) { + if ( !is_bool($src) && !preg_match('|^(https?:)?//|', $src) && ! ( $this->content_url && 0 === strpos($src, $this->content_url) ) ) { $src = $this->base_url . $src; }