+ } elseif ( $this->recurse_deps( $this->registered[ $queued ]->deps, $handle ) ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Query list for an item.
+ *
+ * @access public
+ * @since 2.1.0
+ *
+ * @param string $handle Name of the item. Should be unique.
+ * @param string $list Property name of list array.
+ * @return bool Found, or object Item data.
+ */
+ public function query( $handle, $list = 'registered' ) {
+ switch ( $list ) {
+ case 'registered' :
+ case 'scripts': // back compat
+ if ( isset( $this->registered[ $handle ] ) )
+ return $this->registered[ $handle ];
+ return false;
+
+ case 'enqueued' :
+ case 'queue' :
+ if ( in_array( $handle, $this->queue ) ) {
+ return true;
+ }
+ return $this->recurse_deps( $this->queue, $handle );
+
+ case 'to_do' :
+ case 'to_print': // back compat
+ return in_array( $handle, $this->to_do );
+
+ case 'done' :
+ case 'printed': // back compat
+ return in_array( $handle, $this->done );
+ }