WordPress.org

Make WordPress Core

Changeset 5145


Ignore:
Timestamp:
03/31/07 02:47:23 (7 years ago)
Author:
rob1n
Message:

Add https:// support to script loader. Props abtime. fixes #4046

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/script-loader.php

    r5118 r5145  
    150150                        $ver .= '&' . $this->args[$handle]; 
    151151                    $src = 0 === strpos($this->scripts[$handle]->src, 'http://') ? $this->scripts[$handle]->src : get_option( 'siteurl' ) . $this->scripts[$handle]->src; 
     152                    $src = $this->scripts[$handle]->src; 
     153                     
     154                    if (!preg_match('|^https?://|', $src)) { 
     155                        $src = get_option('siteurl') . $src; 
     156                    } 
     157                     
    152158                    $src = add_query_arg('ver', $ver, $src); 
    153159                    $src = clean_url(apply_filters( 'script_loader_src', $src )); 
Note: See TracChangeset for help on using the changeset viewer.