WP_Scripts::print_scripts()publicWP 2.1.0

Prints scripts.

Prints the scripts passed to it or the print queue. Also prints all necessary dependencies.

Method of the class: WP_Scripts{}

No Hooks.


String[]. Handles of scripts that have been printed.


global $wp_scripts;
$wp_scripts->print_scripts( $handles, $group );
Scripts to be printed: queue (false), single script (string), or multiple scripts (array of strings).
Default: false
Group level: level (int), no groups (false).
Default: false


Since 2.1.0 Introduced.
Since 2.8.0 Added the $group parameter.

WP_Scripts::print_scripts() code WP 6.5.2

public function print_scripts( $handles = false, $group = false ) {
	return $this->do_items( $handles, $group );