Add https:// support to script loader. Props abtime. fixes #4046
git-svn-id: https://develop.svn.wordpress.org/trunk@5145 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
362760a485
commit
78ed2a6eca
@ -149,6 +149,12 @@ class WP_Scripts {
|
||||
if ( isset($this->args[$handle]) )
|
||||
$ver .= '&' . $this->args[$handle];
|
||||
$src = 0 === strpos($this->scripts[$handle]->src, 'http://') ? $this->scripts[$handle]->src : get_option( 'siteurl' ) . $this->scripts[$handle]->src;
|
||||
$src = $this->scripts[$handle]->src;
|
||||
|
||||
if (!preg_match('|^https?://|', $src)) {
|
||||
$src = get_option('siteurl') . $src;
|
||||
}
|
||||
|
||||
$src = add_query_arg('ver', $ver, $src);
|
||||
$src = clean_url(apply_filters( 'script_loader_src', $src ));
|
||||
echo "<script type='text/javascript' src='$src'></script>\n";
|
||||
|
Loading…
Reference in New Issue
Block a user