WP_Scripts::all_deps()publicWP 2.1.0

Determines script dependencies.

Method of the class: WP_Scripts{}

Hooks from the method


true|false. True on success, false on failure.


global $wp_scripts;
$wp_scripts->all_deps( $handles, $recursion, $group );
$handles(string|string[]) (required)
Item handle (string) or item handles (array of strings).
Internal flag that function is calling itself.
Default: false
Group level: level (int), no groups (false).
Default: false



Since 2.1.0 Introduced.

WP_Scripts::all_deps() code WP 6.4.3

public function all_deps( $handles, $recursion = false, $group = false ) {
	$r = parent::all_deps( $handles, $recursion, $group );
	if ( ! $recursion ) {
		 * Filters the list of script dependencies left to print.
		 * @since 2.3.0
		 * @param string[] $to_do An array of script dependency handles.
		$this->to_do = apply_filters( 'print_scripts_array', $this->to_do );
	return $r;