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
878  * @global bool $concatenate_scripts
879  *
880  * @return array
881  */
882 function print_head_scripts() {
883      global $concatenate_scripts;
884
885      if ( ! did_action('wp_print_scripts') ) {
886           /** This action is documented in wp-includes/functions.wp-scripts.php */
887           do_action( 'wp_print_scripts' );
888      }
889
890      $wp_scripts = wp_scripts();
891
892      script_concat_settings();
893      $wp_scripts->do_concat = $concatenate_scripts;
894      $wp_scripts->do_head_items();
895
896      /**
 
Line Code
988  * @since 2.8.0
989  *
990  * @global WP_Scripts $wp_scripts
991  *
992  * @return array
993  */
994 function wp_print_head_scripts() {
995      if ( ! did_action('wp_print_scripts') ) {
996           /** This action is documented in wp-includes/functions.wp-scripts.php */
997           do_action( 'wp_print_scripts' );
998      }
999
1000      global $wp_scripts;
1001
1002      if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
1003           return array(); // no need to run if nothing is queued
1004      }
1005      return print_head_scripts();
1006 }