WP_Scripts::are_all_dependents_in_footer( string $handle ): bool

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Checks whether all dependents of a given handle are in the footer.

Description

If there are no dependents, this is considered the same as if all dependents were in the footer.

Parameters

$handlestringrequired
Script handle.

Return

bool Whether all dependents are in the footer.

Source

private function are_all_dependents_in_footer( $handle ) {
	foreach ( $this->get_dependents( $handle ) as $dep ) {
		if ( isset( $this->groups[ $dep ] ) && 0 === $this->groups[ $dep ] ) {
			return false;
		}
	}
	return true;
}

Changelog

VersionDescription
6.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.