wp-includes/class-wp-dependencies.php:192Determines dependencies.
$handlesstring|string[]$recursionbooloptionalfalse$groupint|falseoptionalfalsebool public function all_deps( $handles, $recursion = false, $group = false ) { $handles = (array) $handles; if ( ! $handles ) { return false; } foreach ( $handles as $handle ) { $handle_parts = explode( '?', $handle ); $handle = $handle_parts[0]; $queued = in_array( $handle, $this->to_do, true ); if ( in_array( $handle, $this->done, true ) ) { // Already done. continue; } $moved = $this->set_group( $handle, $recursion, $group ); $new_group = $this->groups[ $handle ]; if ( $queued && ! $moved ) { // Already queued and in the right group. continue; } $keep_going = true; $missing_dependencies = array(); if ( isset( $this->registered[ $handle ] ) && count( $this->registered[ $handle ]->deps ) > 0 ) { $missing_dependencies = array_diff( $this->registered[ $handle ]->deps, array_keys( $this->registered ) ); } if ( ! isset( $this->registered[ $handle ] ) ) { $keep_going = false; // Item doesn't exist. } elseif ( count( $missing_dependencies ) > 0 ) { if ( ! in_array( $handle, $this->dependencies_with_missing_dependencies, true ) ) { _doing_it_wrong( get_class( $this ) . '::add', $this->get_dependency_warning_message( $handle, $missing_dependencies ), '6.9.1' ); $this->dependencies_with_missing_dependencies[] = $handle; } $keep_going = false; // Item requires dependencies that don't exist. } elseif ( $this->registered[ $handle ]->deps && ! $this->all_deps( $this->registered[ $handle ]->deps, true, $new_group ) ) { $keep_going = false; // Item requires dependencies that don't exist. } if ( ! $keep_going ) { // Either item or its dependencies don't exist. if ( $recursion ) { return false; // Abort this branch. } else { continue; // We're at the top level. Move on to the next one. } } if ( $queued ) { // Already grabbed it and its dependencies. continue; } if ( isset( $handle_parts[1] ) ) { $this->args[ $handle ] = $handle_parts[1]; } $this->to_do[] = $handle; } return true; }Introduced in 2.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/class-wp-dependencies.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.