wp-includes/class-wp-script-modules.php:759Retrieves all the dependencies for the given script module identifiers, filtered by import types.
$idsstring[]$import_typesstring[]optionalarray('static', 'dynamic')array<string, private function get_dependencies( array $ids, array $import_types = array( 'static', 'dynamic' ) ): array { $all_dependencies = array(); $id_queue = $ids; while ( ! empty( $id_queue ) ) { $id = array_shift( $id_queue ); if ( ! isset( $this->registered[ $id ] ) ) { continue; } foreach ( $this->registered[ $id ]['dependencies'] as $dependency ) { if ( ! isset( $all_dependencies[ $dependency['id'] ] ) && in_array( $dependency['import'], $import_types, true ) && isset( $this->registered[ $dependency['id'] ] ) ) { $all_dependencies[ $dependency['id'] ] = $this->registered[ $dependency['id'] ]; // Add this dependency to the list to get dependencies for. $id_queue[] = $dependency['id']; } } } return $all_dependencies; }Introduced in 6.5.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
array[] to array<string,.verified against sourcesrc/wp-includes/class-wp-script-modules.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.