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
857  * @global bool $concatenate_scripts
858  *
859  * @return array
860  */
861 function print_head_scripts() {
862      global $concatenate_scripts;
863
864      if ( ! did_action('wp_print_scripts') ) {
865           /** This action is documented in wp-includes/functions.wp-scripts.php */
866           do_action( 'wp_print_scripts' );
867      }
868
869      $wp_scripts = wp_scripts();
870
871      script_concat_settings();
872      $wp_scripts->do_concat = $concatenate_scripts;
873      $wp_scripts->do_head_items();
874
875      /**
 
Line Code
967  * @since 2.8.0
968  *
969  * @global WP_Scripts $wp_scripts
970  *
971  * @return array
972  */
973 function wp_print_head_scripts() {
974      if ( ! did_action('wp_print_scripts') ) {
975           /** This action is documented in wp-includes/functions.wp-scripts.php */
976           do_action( 'wp_print_scripts' );
977      }
978
979      global $wp_scripts;
980
981      if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
982           return array(); // no need to run if nothing is queued
983      }
984      return print_head_scripts();
985 }