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 |
|---|---|
| 717 | * @since 2.8 |
| 718 | * |
| 719 | * @see wp_print_scripts() |
| 720 | */ |
| 721 | function print_head_scripts() { |
| 722 | global $wp_scripts, $concatenate_scripts; |
| 723 | |
| 724 | if ( ! did_action('wp_print_scripts') ) { |
| 725 | /** This action is documented in wp-includes/functions.wp-scripts.php */ |
| 726 | do_action( 'wp_print_scripts' ); |
| 727 | } |
| 728 | |
| 729 | if ( !is_a($wp_scripts, 'WP_Scripts') ) |
| 730 | $wp_scripts = new WP_Scripts(); |
| 731 | |
| 732 | script_concat_settings(); |
| 733 | $wp_scripts->do_concat = $concatenate_scripts; |
| 734 | $wp_scripts->do_head_items(); |
| 735 | |
| Line | Code |
| 798 | * |
| 799 | * Postpones the scripts that were queued for the footer. |
| 800 | * wp_print_footer_scripts() is called in the footer to print these scripts. |
| 801 | * |
| 802 | * @since 2.8 |
| 803 | */ |
| 804 | function wp_print_head_scripts() { |
| 805 | if ( ! did_action('wp_print_scripts') ) { |
| 806 | /** This action is documented in wp-includes/functions.wp-scripts.php */ |
| 807 | do_action( 'wp_print_scripts' ); |
| 808 | } |
| 809 | |
| 810 | global $wp_scripts; |
| 811 | |
| 812 | if ( !is_a($wp_scripts, 'WP_Scripts') ) |
| 813 | return array(); // no need to run if nothing is queued |
| 814 | |
| 815 | return print_head_scripts(); |
| 816 | } |