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 |
---|---|
2003 | * @global bool $concatenate_scripts |
2004 | * |
2005 | * @return array |
2006 | */ |
2007 | function print_head_scripts() { |
2008 | global $concatenate_scripts; |
2009 |
|
2010 | if ( ! did_action( 'wp_print_scripts' ) ) { |
2011 | /** This action is documented in wp-includes/functions.wp-scripts.php */ |
2012 | do_action( 'wp_print_scripts' ); |
2013 | } |
2014 |
|
2015 | $wp_scripts = wp_scripts(); |
2016 |
|
2017 | script_concat_settings(); |
2018 | $wp_scripts->do_concat = $concatenate_scripts; |
2019 | $wp_scripts->do_head_items(); |
2020 |
|
2021 | /** |
Line | Code |
2123 | * @global WP_Scripts $wp_scripts |
2124 | * |
2125 | * @return array |
2126 | */ |
2127 | function wp_print_head_scripts() { |
2128 | global $wp_scripts; |
2129 |
|
2130 | if ( ! did_action( 'wp_print_scripts' ) ) { |
2131 | /** This action is documented in wp-includes/functions.wp-scripts.php */ |
2132 | do_action( 'wp_print_scripts' ); |
2133 | } |
2134 |
|
2135 | if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { |
2136 | return array(); // No need to run if nothing is queued. |
2137 | } |
2138 |
|
2139 | return print_head_scripts(); |
2140 | } |
2141 |
|