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 |
---|---|
118 | if ( $this->do_concat ) { |
119 | /** |
120 | * Filter the script loader source. |
121 | * |
122 | * @since 2.2.0 |
123 | * |
124 | * @param string $src Script loader source path. |
125 | * @param string $handle Script handle. |
126 | */ |
127 | $srce = apply_filters( 'script_loader_src', $src, $handle ); |
128 | if ( $this->in_default_dir( $srce ) && ! $conditional ) { |
129 | $this->print_code .= $this->print_extra_script( $handle, false ); |
130 | $this->concat .= "$handle,"; |
131 | $this->concat_version .= "$handle$ver"; |
132 | return true; |
133 | } else { |
134 | $this->ext_handles .= "$handle,"; |
135 | $this->ext_version .= "$handle$ver"; |
136 | } |
Line | Code |
150 |
|
151 | if ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $this->content_url && 0 === strpos( $src, $this->content_url ) ) ) { |
152 | $src = $this->base_url . $src; |
153 | } |
154 |
|
155 | if ( ! empty( $ver ) ) |
156 | $src = add_query_arg( 'ver', $ver, $src ); |
157 |
|
158 | /** This filter is documented in wp-includes/class.wp-scripts.php */ |
159 | $src = esc_url( apply_filters( 'script_loader_src', $src, $handle ) ); |
160 |
|
161 | if ( ! $src ) |
162 | return true; |
163 |
|
164 | $tag = "{$cond_before}<script type='text/javascript' src='$src'></script>\n{$cond_after}"; |
165 |
|
166 | /** |
167 | * Filter the HTML script tag of an enqueued script. |
168 | * |