[ WordPress.org  ](https://wordpress.org/)

  * [ News  ](https://wordpress.org/news/)
  * [ Showcase  ](https://wordpress.org/showcase/)
  * [ Hosting  ](https://wordpress.org/hosting/)
  * Extend 
    * [ Themes  ](https://wordpress.org/themes/)
    * [ Plugins  ](https://wordpress.org/plugins/)
    * [ Patterns  ](https://wordpress.org/patterns/)
    * [ Blocks  ](https://wordpress.org/blocks/)
    * [ Openverse  ↗  ︎  ](https://openverse.org/)
  * Learn 
    * [ Learn WordPress  ](https://learn.wordpress.org/)
    * [ Documentation  ](https://wordpress.org/documentation/)
    * [ Forums  ](https://wordpress.org/support/forums/)
    * [ Developers  ](https://developer.wordpress.org/)
    * [ WordPress.tv  ↗  ︎  ](https://wordpress.tv/)
  * Community 
    * [ Make WordPress  ](https://make.wordpress.org/)
    * [ Photo Directory  ](https://wordpress.org/photos/)
    * [ Five for the Future  ](https://wordpress.org/five-for-the-future/)
    * [ Events  ](https://events.wordpress.org/)
    * [ Job Board  ↗  ︎  ](https://jobs.wordpress.net/)
  * About 
    * [ About WordPress  ](https://wordpress.org/about/)
    * [ Enterprise  ](https://wordpress.org/enterprise/)
    * [ Gutenberg  ↗  ︎  ](https://wordpress.org/gutenberg/)
    * [ Swag Store  ↗  ︎  ](https://mercantile.wordpress.org/)
  * [ Get WordPress  ](https://wordpress.org/download/)

Search in WordPress.org

[ Get WordPress ](https://wordpress.org/download/)

[ WordPress.org  ](https://wordpress.org/)

[ WordPress Developer Resources ](https://developer.wordpress.org)

WP_Scripts::are_all_dependents_in_footer()

  * [ Developer Blog  ](https://developer.wordpress.org/news/)
  * [ Code Reference  ](https://developer.wordpress.org/reference/)
  * [ WP-CLI Commands  ](https://developer.wordpress.org/cli/commands/)

  * [ Developer Blog  ](https://developer.wordpress.org/news/)
  * [ Code Reference  ](https://developer.wordpress.org/reference/)
  * [ WP-CLI Commands  ](https://developer.wordpress.org/cli/commands/)

[ Home ](https://developer.wordpress.org) [ Reference
](https://developer.wordpress.org/reference/) [ Classes
](https://developer.wordpress.org/reference/classes/) [ WP_Scripts
](https://developer.wordpress.org/reference/classes/wp_scripts/)
WP_Scripts::are_all_dependents_in_footer()

Search

#  WP_Scripts::are_all_dependents_in_footer(  string  $handle  ):  bool

##  In this article

Table of Contents

  * Description 
  * Parameters 
  * Return 
  * Source 
  * Related 
  * Changelog 

↑  Back to top

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

` $handle ` string  required

    

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;
    }
    

[ View all references ](https://developer.wordpress.org/reference/files/wp-
includes_class-wp-scripts-php-2/) [ View on Trac
](https://core.trac.wordpress.org/browser/tags/6.5/src/wp-includes/class-wp-
scripts.php#L244) [ View on GitHub ](https://github.com/WordPress/wordpress-
develop/blob/6.5/src/wp-includes/class-wp-scripts.php#L244-L251)

##  Related

Uses  |  Description   
---|---  
[ WP_Scripts::get_dependents() ](https://developer.wordpress.org/reference/classes/wp_scripts/get_dependents/) ` wp-includes/class-wp-scripts.php ` |  Gets all dependents of a script.   
Used by  |  Description   
---|---  
[ WP_Scripts::do_item() ](https://developer.wordpress.org/reference/classes/wp_scripts/do_ite