WP_Scripts::print_scripts()
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.
Return
String[]
. Handles of scripts that have been printed.
Usage
global $wp_scripts; $wp_scripts->print_scripts( $handles, $group );
- $handles(string|string[]|false)
- Scripts to be printed: queue (false), single script (string), or multiple scripts (array of strings).
Default: false - $group(int|false)
- Group level: level (int), no groups (false).
Default: false
Changelog
Since 2.1.0 | Introduced. |
Since 2.8.0 | Added the $group parameter. |
WP_Scripts::print_scripts() WP Scripts::print scripts code WP 6.7.1
public function print_scripts( $handles = false, $group = false ) { return $this->do_items( $handles, $group ); }