]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/class.wp-scripts.php
Wordpress 3.5
[autoinstalls/wordpress.git] / wp-includes / class.wp-scripts.php
index ff0ca4d5dc52cc164e89fdfb96bd5cda2bf35c6f..f75929b4abf875beb27ab1f6f3f325b23ca27eb1 100644 (file)
@@ -31,10 +31,8 @@ class WP_Scripts extends WP_Dependencies {
        var $default_dirs;
 
        function __construct() {
-               if ( ! function_exists( 'did_action' ) || did_action( 'init' ) )
-                       $this->init();
-               else
-                       add_action( 'init', array( $this, 'init' ), 0 );
+               $this->init();
+               add_action( 'init', array( $this, 'init' ), 0 );
        }
 
        function init() {
@@ -112,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;
                }