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 |
|---|---|
| 1907 | * @global bool $concatenate_scripts |
| 1908 | * |
| 1909 | * @return array |
| 1910 | */ |
| 1911 | function print_head_scripts() { |
| 1912 | global $concatenate_scripts; |
| 1913 | |
| 1914 | if ( ! did_action( 'wp_print_scripts' ) ) { |
| 1915 | /** This action is documented in wp-includes/functions.wp-scripts.php */ |
| 1916 | do_action( 'wp_print_scripts' ); |
| 1917 | } |
| 1918 | |
| 1919 | $wp_scripts = wp_scripts(); |
| 1920 | |
| 1921 | script_concat_settings(); |
| 1922 | $wp_scripts->do_concat = $concatenate_scripts; |
| 1923 | $wp_scripts->do_head_items(); |
| 1924 | |
| 1925 | /** |
| Line | Code |
| 2025 | * @since 2.8.0 |
| 2026 | * |
| 2027 | * @global WP_Scripts $wp_scripts |
| 2028 | * |
| 2029 | * @return array |
| 2030 | */ |
| 2031 | function wp_print_head_scripts() { |
| 2032 | if ( ! did_action( 'wp_print_scripts' ) ) { |
| 2033 | /** This action is documented in wp-includes/functions.wp-scripts.php */ |
| 2034 | do_action( 'wp_print_scripts' ); |
| 2035 | } |
| 2036 | |
| 2037 | global $wp_scripts; |
| 2038 | |
| 2039 | if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { |
| 2040 | return array(); // No need to run if nothing is queued. |
| 2041 | } |
| 2042 | return print_head_scripts(); |
| 2043 | } |