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:
parent
d303a241d1
commit
a9f80b1937
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue