WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
| Line | Code |
|---|---|
| 2086 | * @global bool $concatenate_scripts |
| 2087 | * |
| 2088 | * @return array |
| 2089 | */ |
| 2090 | function print_head_scripts() { |
| 2091 | global $concatenate_scripts; |
| 2092 | |
| 2093 | if ( ! did_action( 'wp_print_scripts' ) ) { |
| 2094 | /** This action is documented in wp-includes/functions.wp-scripts.php */ |
| 2095 | do_action( 'wp_print_scripts' ); |
| 2096 | } |
| 2097 | |
| 2098 | $wp_scripts = wp_scripts(); |
| 2099 | |
| 2100 | script_concat_settings(); |
| 2101 | $wp_scripts->do_concat = $concatenate_scripts; |
| 2102 | $wp_scripts->do_head_items(); |
| 2103 | |
| 2104 | /** |
| Line | Code |
| 2206 | * @global WP_Scripts $wp_scripts |
| 2207 | * |
| 2208 | * @return array |
| 2209 | */ |
| 2210 | function wp_print_head_scripts() { |
| 2211 | global $wp_scripts; |
| 2212 | |
| 2213 | if ( ! did_action( 'wp_print_scripts' ) ) { |
| 2214 | /** This action is documented in wp-includes/functions.wp-scripts.php */ |
| 2215 | do_action( 'wp_print_scripts' ); |
| 2216 | } |
| 2217 | |
| 2218 | if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { |
| 2219 | return array(); // No need to run if nothing is queued. |
| 2220 | } |
| 2221 | |
| 2222 | return print_head_scripts(); |
| 2223 | } |
| 2224 | |