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 |
---|---|
2095 | * @global bool $concatenate_scripts |
2096 | * |
2097 | * @return array |
2098 | */ |
2099 | function print_head_scripts() { |
2100 | global $concatenate_scripts; |
2101 |
|
2102 | if ( ! did_action( 'wp_print_scripts' ) ) { |
2103 | /** This action is documented in wp-includes/functions.wp-scripts.php */ |
2104 | do_action( 'wp_print_scripts' ); |
2105 | } |
2106 |
|
2107 | $wp_scripts = wp_scripts(); |
2108 |
|
2109 | script_concat_settings(); |
2110 | $wp_scripts->do_concat = $concatenate_scripts; |
2111 | $wp_scripts->do_head_items(); |
2112 |
|
2113 | /** |
Line | Code |
2215 | * @global WP_Scripts $wp_scripts |
2216 | * |
2217 | * @return array |
2218 | */ |
2219 | function wp_print_head_scripts() { |
2220 | global $wp_scripts; |
2221 |
|
2222 | if ( ! did_action( 'wp_print_scripts' ) ) { |
2223 | /** This action is documented in wp-includes/functions.wp-scripts.php */ |
2224 | do_action( 'wp_print_scripts' ); |
2225 | } |
2226 |
|
2227 | if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { |
2228 | return array(); // No need to run if nothing is queued. |
2229 | } |
2230 |
|
2231 | return print_head_scripts(); |
2232 | } |
2233 |
|