print_footer_scripts

Prints the scripts that were queued for the footer or too late for the HTML head.

Description

(array) print_footer_scripts(); 

Returns (array)


Usage

  1. if ( !function_exists( 'print_footer_scripts' ) ) { 
  2. require_once ABSPATH . WPINC . '/script-loader.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = print_footer_scripts(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/script-loader.php  
  1. function print_footer_scripts() { 
  2. global $wp_scripts, $concatenate_scripts; 
  3.  
  4. if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { 
  5. return array(); // No need to run if not instantiated. 
  6. $wp_scripts->do_concat = $concatenate_scripts; 
  7. $wp_scripts->do_footer_items(); 
  8.  
  9. /** 
  10. * Filters whether to print the footer scripts. 
  11. * @since 2.8.0 
  12. * @param bool $print Whether to print the footer scripts. Default true. 
  13. */ 
  14.  
  15. $wp_scripts->reset(); 
  16. return $wp_scripts->done;