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 |
|---|---|
| 206 | * @return array Scripts that have been printed |
| 207 | */ |
| 208 | function print_scripts( $handles = false ) { |
| 209 | global $wp_db_version; |
| 210 | |
| 211 | // Print the queue if nothing is passed. If a string is passed, print that script. If an array is passed, print those scripts. |
| 212 | $handles = false === $handles ? $this->queue : (array) $handles; |
| 213 | $this->all_deps( $handles ); |
| 214 | |
| 215 | $to_print = apply_filters( 'print_scripts_array', array_keys($this->to_print) ); |
| 216 | |
| 217 | foreach( $to_print as $handle ) { |
| 218 | if ( !in_array($handle, $this->printed) && isset($this->scripts[$handle]) ) { |
| 219 | if ( $this->scripts[$handle]->src ) { // Else it defines a group. |
| 220 | $ver = $this->scripts[$handle]->ver ? $this->scripts[$handle]->ver : $wp_db_version; |
| 221 | if ( isset($this->args[$handle]) ) |
| 222 | $ver .= '&' . $this->args[$handle]; |
| 223 | $src = 0 === strpos($this->scripts[$handle]->src, 'http://') ? $this->scripts[$handle]->src : get_option( 'siteurl' ) . $this->scripts[$handle]->src; |
| 224 | $src = $this->scripts[$handle]->src; |