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 |
---|---|
1128 | * @global bool $concatenate_scripts |
1129 | * |
1130 | * @return array |
1131 | */ |
1132 | function print_head_scripts() { |
1133 | global $concatenate_scripts; |
1134 |
|
1135 | if ( ! did_action('wp_print_scripts') ) { |
1136 | /** This action is documented in wp-includes/functions.wp-scripts.php */ |
1137 | do_action( 'wp_print_scripts' ); |
1138 | } |
1139 |
|
1140 | $wp_scripts = wp_scripts(); |
1141 |
|
1142 | script_concat_settings(); |
1143 | $wp_scripts->do_concat = $concatenate_scripts; |
1144 | $wp_scripts->do_head_items(); |
1145 |
|
1146 | /** |
Line | Code |
1238 | * @since 2.8.0 |
1239 | * |
1240 | * @global WP_Scripts $wp_scripts |
1241 | * |
1242 | * @return array |
1243 | */ |
1244 | function wp_print_head_scripts() { |
1245 | if ( ! did_action('wp_print_scripts') ) { |
1246 | /** This action is documented in wp-includes/functions.wp-scripts.php */ |
1247 | do_action( 'wp_print_scripts' ); |
1248 | } |
1249 |
|
1250 | global $wp_scripts; |
1251 |
|
1252 | if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { |
1253 | return array(); // no need to run if nothing is queued |
1254 | } |
1255 | return print_head_scripts(); |
1256 | } |