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 |
|---|---|
| 287 | if ( $this->do_concat ) { |
| 288 | /** |
| 289 | * Filters the script loader source. |
| 290 | * |
| 291 | * @since 2.2.0 |
| 292 | * |
| 293 | * @param string $src Script loader source path. |
| 294 | * @param string $handle Script handle. |
| 295 | */ |
| 296 | $srce = apply_filters( 'script_loader_src', $src, $handle ); |
| 297 | |
| 298 | if ( $this->in_default_dir( $srce ) && ( $before_handle || $after_handle ) ) { |
| 299 | $this->do_concat = false; |
| 300 | |
| 301 | // Have to print the so-far concatenated scripts right away to maintain the right order. |
| 302 | _print_scripts(); |
| 303 | $this->reset(); |
| 304 | } elseif ( $this->in_default_dir( $srce ) && ! $conditional ) { |
| 305 | $this->print_code .= $this->print_extra_script( $handle, false ); |
| Line | Code |
| 331 | |
| 332 | if ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $this->content_url && 0 === strpos( $src, $this->content_url ) ) ) { |
| 333 | $src = $this->base_url . $src; |
| 334 | } |
| 335 | |
| 336 | if ( ! empty( $ver ) ) |
| 337 | $src = add_query_arg( 'ver', $ver, $src ); |
| 338 | |
| 339 | /** This filter is documented in wp-includes/class.wp-scripts.php */ |
| 340 | $src = esc_url( apply_filters( 'script_loader_src', $src, $handle ) ); |
| 341 | |
| 342 | if ( ! $src ) |
| 343 | return true; |
| 344 | |
| 345 | $tag = "{$cond_before}{$before_handle}<script type='text/javascript' src='$src'></script>\n{$after_handle}{$cond_after}"; |
| 346 | |
| 347 | /** |
| 348 | * Filters the HTML script tag of an enqueued script. |
| 349 | * |