Make WordPress Core

Changeset 12049


Ignore:
Timestamp:
10/18/2009 05:51:30 AM (17 years ago)
Author:
azaozz
Message:

Bring WP_Dependencies::dequeue() in line with WP_Dependencies::enqueue(), props chrisbliss18, fixes #9870

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class.wp-dependencies.php

    r11450 r12049  
    172172
    173173        function dequeue( $handles ) {
    174                 foreach ( (array) $handles as $handle )
    175                         unset( $this->queue[$handle] );
     174                foreach ( (array) $handles as $handle ) {
     175                        $handle = explode('?', $handle);
     176                        $key = array_search($handle[0], $this->queue);
     177                        if ( false !== $key ) {
     178                                unset($this->queue[$key]);
     179                                unset($this->args[$handle[0]]);
     180                        }
     181                }
    176182        }
    177183
Note: See TracChangeset for help on using the changeset viewer.