Changeset 29252 for trunk/src/wp-includes/class.wp-dependencies.php
- Timestamp:
- 07/20/2014 12:28:57 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class.wp-dependencies.php
r28517 r29252 326 326 327 327 /** 328 * Recursively search the passed dependency tree for $handle 329 * 330 * @since 4.0.0 331 * 332 * @param array $queue An array of queued _WP_Dependency handle objects. 333 * @param string $handle Name of the item. Should be unique. 334 * @return boolean Whether the handle is found after recursively searching the dependency tree. 335 */ 336 protected function recurse_deps( $queue, $handle ) { 337 foreach ( $queue as $queued ) { 338 if ( ! isset( $this->registered[ $queued ] ) ) { 339 continue; 340 } 341 342 if ( in_array( $handle, $this->registered[ $queued ]->deps ) ) { 343 return true; 344 } else { 345 return $this->recurse_deps( $this->registered[ $queued ]->deps, $handle ); 346 } 347 } 348 349 return false; 350 } 351 352 /** 328 353 * Query list for an item. 329 354 * … … 345 370 case 'enqueued' : 346 371 case 'queue' : 347 return in_array( $handle, $this->queue ); 372 if ( in_array( $handle, $this->queue ) ) { 373 return true; 374 } 375 return $this->recurse_deps( $this->queue, $handle ); 348 376 349 377 case 'to_do' :
Note: See TracChangeset
for help on using the changeset viewer.