Bring WP_Dependencies::dequeue() in line with WP_Dependencies::enqueue(), props chrisbliss18, fixes #9870
git-svn-id: https://develop.svn.wordpress.org/trunk@12049 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8427416edf
commit
6b03fbb997
@ -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
Block a user