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

git-svn-id: http://svn.automattic.com/wordpress/trunk@12049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-10-18 05:51:30 +00:00
parent d303a241d1
commit a9f80b1937
1 changed files with 8 additions and 2 deletions

View 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