wp_print_scripts


wp_print_scripts ( $handles = false )

Parameters:
  • (string|string[]|false) handles Optional. Scripts to be printed. Default 'false'.
See:
  • WP_Scripts::do_item()
Returns:
  • (string[]) On success, an array of handles of processed WP_Dependencies items; otherwise, an empty array.
Defined at:

Description

Prints scripts in document head that are in the $handles queue.Called by admin-header.php and {@see 'wp_head'} hook. Since it is called by wp_head on every page load, the function does not instantiate the WP_Scripts object unless script names are explicitly passed. Makes use of already-instantiated `$wp_scripts` global if present. Use provided {@see 'wp_print_scripts'} hook to register/enqueue new scripts.

Related Functions

wp_print_head_scripts, wp_print_script_tag, wp_print_footer_scripts, wp_playlist_scripts, wp_print_styles

Top Google Results

User discussions

wpseek mobile