Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_print_scripts

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
690  * print_footer_scripts() is called in the footer to print these scripts.
691  *
692  * @since 2.8
693  * @see wp_print_scripts()
694  */
695 function print_head_scripts() {
696      global $wp_scripts, $concatenate_scripts;
697
698      if ( ! did_action('wp_print_scripts') )
699           do_action('wp_print_scripts');
700
701      if ( !is_a($wp_scripts, 'WP_Scripts') )
702           $wp_scripts = new WP_Scripts();
703
704      script_concat_settings();
705      $wp_scripts->do_concat = $concatenate_scripts;
706      $wp_scripts->do_head_items();
707
708      if ( apply_filters('print_head_scripts', true) )
 
Line Code
769  * Prints the script queue in the HTML head on the front end.
770  *
771  * Postpones the scripts that were queued for the footer.
772  * wp_print_footer_scripts() is called in the footer to print these scripts.
773  *
774  * @since 2.8
775  */
776 function wp_print_head_scripts() {
777      if ( ! did_action('wp_print_scripts') )
778           do_action('wp_print_scripts');
779
780      global $wp_scripts;
781
782      if ( !is_a($wp_scripts, 'WP_Scripts') )
783           return array(); // no need to run if nothing is queued
784
785      return print_head_scripts();
786 }
787