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
1053  * @global bool $concatenate_scripts
1054  *
1055  * @return array
1056  */
1057 function print_head_scripts() {
1058      global $concatenate_scripts;
1059
1060      if ( ! did_action('wp_print_scripts') ) {
1061           /** This action is documented in wp-includes/functions.wp-scripts.php */
1062           do_action( 'wp_print_scripts' );
1063      }
1064
1065      $wp_scripts = wp_scripts();
1066
1067      script_concat_settings();
1068      $wp_scripts->do_concat = $concatenate_scripts;
1069      $wp_scripts->do_head_items();
1070
1071      /**
 
Line Code
1163  * @since 2.8.0
1164  *
1165  * @global WP_Scripts $wp_scripts
1166  *
1167  * @return array
1168  */
1169 function wp_print_head_scripts() {
1170      if ( ! did_action('wp_print_scripts') ) {
1171           /** This action is documented in wp-includes/functions.wp-scripts.php */
1172           do_action( 'wp_print_scripts' );
1173      }
1174
1175      global $wp_scripts;
1176
1177      if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
1178           return array(); // no need to run if nothing is queued
1179      }
1180      return print_head_scripts();
1181 }