print_scripts_array
Filter HookDescription
Filters the list of script dependencies left to print.Hook Information
File Location |
wp-includes/class-wp-scripts.php
View on GitHub
|
Hook Type | Filter |
Line Number | 735 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$to_do
|
An array of script dependency handles. |
Usage Examples
Basic Usage
<?php
// Hook into print_scripts_array
add_filter('print_scripts_array', 'my_custom_filter', 10, 1);
function my_custom_filter($to_do) {
// Your custom filtering logic here
return $to_do;
}
Source Code Context
wp-includes/class-wp-scripts.php:735
- How this hook is used in WordPress core
<?php
730 *
731 * @since 2.3.0
732 *
733 * @param string[] $to_do An array of script dependency handles.
734 */
735 $this->to_do = apply_filters( 'print_scripts_array', $this->to_do );
736 }
737 return $result;
738 }
739
740 /**
PHP Documentation
<?php
/**
* Filters the list of script dependencies left to print.
*
* @since 2.3.0
*
* @param string[] $to_do An array of script dependency handles.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/class-wp-scripts.php
Related Hooks
Related hooks will be displayed here in future updates.