]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/class.wp-dependencies.php
Wordpress 3.0.4
[autoinstalls/wordpress.git] / wp-includes / class.wp-dependencies.php
index af3808b8c7e05ae9c25211f02ebac35b7ead684b..ea607de2cf45e534e125e0155b449a4cefe5c151 100644 (file)
@@ -171,8 +171,14 @@ class WP_Dependencies {
        }
 
        function dequeue( $handles ) {
-               foreach ( (array) $handles as $handle )
-                       unset( $this->queue[$handle] );
+               foreach ( (array) $handles as $handle ) {
+                       $handle = explode('?', $handle);
+                       $key = array_search($handle[0], $this->queue);
+                       if ( false !== $key ) {
+                               unset($this->queue[$key]);
+                               unset($this->args[$handle[0]]);
+                       }
+               }
        }
 
        function query( $handle, $list = 'registered' ) { // registered, queue, done, to_do
@@ -226,8 +232,6 @@ class _WP_Dependency {
                @list($this->handle, $this->src, $this->deps, $this->ver, $this->args) = func_get_args();
                if ( !is_array($this->deps) )
                        $this->deps = array();
-               if ( !$this->ver )
-                       $this->ver = false;
        }
 
        function add_data( $name, $data ) {