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.
Line | Code |
---|---|
155 | * @return array Scripts that have been printed |
156 | */ |
157 | function print_scripts( $handles = false ) { |
158 | global $wp_db_version; |
159 |
|
160 | // Print the queue if nothing is passed. If a string is passed, print that script. If an array is passed, print those scripts. |
161 | $handles = false === $handles ? $this->queue : (array) $handles; |
162 | $this->all_deps( $handles ); |
163 |
|
164 | $to_print = apply_filters( 'print_scripts_array', array_keys($this->to_print) ); |
165 |
|
166 | foreach( $to_print as $handle ) { |
167 | if ( !in_array($handle, $this->printed) && isset($this->scripts[$handle]) ) { |
168 | if ( $this->scripts[$handle]->src ) { // Else it defines a group. |
169 | $ver = $this->scripts[$handle]->ver ? $this->scripts[$handle]->ver : $wp_db_version; |
170 | if ( isset($this->args[$handle]) ) |
171 | $ver .= '&' . $this->args[$handle]; |
172 | $src = 0 === strpos($this->scripts[$handle]->src, 'http://') ? $this->scripts[$handle]->src : get_option( 'siteurl' ) . $this->scripts[$handle]->src; |
173 | $src = $this->scripts[$handle]->src; |