Dequeue an item or items.
Description
Decodes handles and arguments, then dequeues handles and removes arguments from the class property $args.
Parameters
$handles
string|string[]required- Item handle (string) or item handles (array of strings).
Source
public function dequeue( $handles ) {
foreach ( (array) $handles as $handle ) {
$handle = explode( '?', $handle );
$key = array_search( $handle[0], $this->queue, true );
if ( false !== $key ) {
// Reset all dependencies so they must be recalculated in recurse_deps().
$this->all_queued_deps = null;
unset( $this->queue[ $key ] );
unset( $this->args[ $handle[0] ] );
} elseif ( array_key_exists( $handle[0], $this->queued_before_register ) ) {
unset( $this->queued_before_register[ $handle[0] ] );
}
}
}
User Contributed Notes
You must log in before being able to contribute a note or feedback.