WP_Scripts::print_scripts( string|string[]|false $handles = false, int|false $group = false ): string[]

In this article

Prints scripts.

Description

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

Parameters

$handlesstring|string[]|falseoptional
Scripts to be printed: queue (false), single script (string), or multiple scripts (array of strings).

Default:false

$groupint|falseoptional
Group level: level (int), no groups (false).

Default:false

Return

string[] Handles of scripts that have been printed.

Source

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

Changelog

VersionDescription
2.8.0Added the $group parameter.
2.1.0Introduced.

User Contributed Notes

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