X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/e059c33afecf52580f31b53393d6a95d08aaef35..11be15bd505d66a91e2c80062190b13e315a04a9:/wp-includes/class.wp-scripts.php diff --git a/wp-includes/class.wp-scripts.php b/wp-includes/class.wp-scripts.php index 0ac2af4d..38f3f9fc 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; } @@ -133,6 +133,9 @@ class WP_Scripts extends WP_Dependencies { * Localizes only if the script has already been added */ function localize( $handle, $object_name, $l10n ) { + if ( $handle === 'jquery' ) + $handle = 'jquery-core'; + if ( is_array($l10n) && isset($l10n['l10n_print_after']) ) { // back compat, preserve the code in 'l10n_print_after' if present $after = $l10n['l10n_print_after']; unset($l10n['l10n_print_after']);