print_scripts_array
Filters the list of script dependencies left to print.
Usage
add_filter( 'print_scripts_array', 'wp_kama_print_scripts_array_filter' ); /** * Function for `print_scripts_array` filter-hook. * * @param string[] $to_do An array of script dependency handles. * * @return string[] */ function wp_kama_print_scripts_array_filter( $to_do ){ // filter... return $to_do; }
- $to_do(string[])
- An array of script dependency handles.
Changelog
Since 2.3.0 | Introduced. |
Where the hook is called
print_scripts_array
wp-includes/class-wp-scripts.php 753
$this->to_do = apply_filters( 'print_scripts_array', $this->to_do );
Where the hook is used in WordPress
wp-includes/default-filters.php 593
add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );