From a9f80b193778c6ae6ebb5d36fa79ea84c73e8589 Mon Sep 17 00:00:00 2001 From: azaozz Date: Sun, 18 Oct 2009 05:51:30 +0000 Subject: [PATCH] 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 --- wp-includes/class.wp-dependencies.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wp-includes/class.wp-dependencies.php b/wp-includes/class.wp-dependencies.php index af3808b8c7..54afdef0b2 100644 --- a/wp-includes/class.wp-dependencies.php +++ b/wp-includes/class.wp-dependencies.php @@ -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