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 |
---|---|
615 | * print_footer_scripts() is called in the footer to print these scripts. |
616 | * |
617 | * @since 2.8 |
618 | * @see wp_print_scripts() |
619 | */ |
620 | function print_head_scripts() { |
621 | global $wp_scripts, $concatenate_scripts; |
622 |
|
623 | if ( ! did_action('wp_print_scripts') ) |
624 | do_action('wp_print_scripts'); |
625 |
|
626 | if ( !is_a($wp_scripts, 'WP_Scripts') ) |
627 | $wp_scripts = new WP_Scripts(); |
628 |
|
629 | script_concat_settings(); |
630 | $wp_scripts->do_items( 'l10n' ); |
631 | $wp_scripts->do_concat = $concatenate_scripts; |
632 | $wp_scripts->do_head_items(); |
633 |
|
Line | Code |
693 | * Prints the script queue in the HTML head on the front end. |
694 | * |
695 | * Postpones the scripts that were queued for the footer. |
696 | * wp_print_footer_scripts() is called in the footer to print these scripts. |
697 | * |
698 | * @since 2.8 |
699 | */ |
700 | function wp_print_head_scripts() { |
701 | if ( ! did_action('wp_print_scripts') ) |
702 | do_action('wp_print_scripts'); |
703 |
|
704 | global $wp_scripts; |
705 |
|
706 | if ( !is_a($wp_scripts, 'WP_Scripts') ) |
707 | return array(); // no need to run if nothing is queued |
708 |
|
709 | return print_head_scripts(); |
710 | } |
711 |
|