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 |
---|---|
1928 | * @global bool $concatenate_scripts |
1929 | * |
1930 | * @return array |
1931 | */ |
1932 | function print_head_scripts() { |
1933 | global $concatenate_scripts; |
1934 |
|
1935 | if ( ! did_action( 'wp_print_scripts' ) ) { |
1936 | /** This action is documented in wp-includes/functions.wp-scripts.php */ |
1937 | do_action( 'wp_print_scripts' ); |
1938 | } |
1939 |
|
1940 | $wp_scripts = wp_scripts(); |
1941 |
|
1942 | script_concat_settings(); |
1943 | $wp_scripts->do_concat = $concatenate_scripts; |
1944 | $wp_scripts->do_head_items(); |
1945 |
|
1946 | /** |
Line | Code |
2048 | * @global WP_Scripts $wp_scripts |
2049 | * |
2050 | * @return array |
2051 | */ |
2052 | function wp_print_head_scripts() { |
2053 | global $wp_scripts; |
2054 |
|
2055 | if ( ! did_action( 'wp_print_scripts' ) ) { |
2056 | /** This action is documented in wp-includes/functions.wp-scripts.php */ |
2057 | do_action( 'wp_print_scripts' ); |
2058 | } |
2059 |
|
2060 | if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { |
2061 | return array(); // No need to run if nothing is queued. |
2062 | } |
2063 |
|
2064 | return print_head_scripts(); |
2065 | } |
2066 |
|