Add https:// support to script loader. Props abtime. fixes #4046
git-svn-id: http://svn.automattic.com/wordpress/trunk@5145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7dac9e0a80
commit
7cb4185f04
|
@ -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