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 |
---|---|
91 | $this->in_footer = array_diff( $this->in_footer, (array) $handle ); |
92 |
|
93 | $ver = $this->registered[$handle]->ver ? $this->registered[$handle]->ver : $this->default_version; |
94 | if ( isset($this->args[$handle]) ) |
95 | $ver .= '&' . $this->args[$handle]; |
96 |
|
97 | $src = $this->registered[$handle]->src; |
98 |
|
99 | if ( $this->do_concat ) { |
100 | $srce = apply_filters( 'script_loader_src', $src, $handle ); |
101 | if ( $this->in_default_dir($srce) ) { |
102 | $this->print_code .= $this->print_scripts_l10n( $handle, false ); |
103 | $this->concat .= "$handle,"; |
104 | $this->concat_version .= "$handle$ver"; |
105 | return true; |
106 | } else { |
107 | $this->ext_handles .= "$handle,"; |
108 | $this->ext_version .= "$handle$ver"; |
109 | } |
110 | } |
111 |
|
112 | $this->print_scripts_l10n( $handle ); |
113 | if ( !preg_match('|^https?://|', $src) && ! ( $this->content_url && 0 === strpos($src, $this->content_url) ) ) { |
114 | $src = $this->base_url . $src; |
115 | } |
116 |
|
117 | $src = add_query_arg('ver', $ver, $src); |
118 | $src = esc_url(apply_filters( 'script_loader_src', $src, $handle )); |
119 |
|
120 | if ( $this->do_concat ) |
121 | $this->print_html .= "<script type='text/javascript' src='$src'></script>\n"; |
122 | else |
123 | echo "<script type='text/javascript' src='$src'></script>\n"; |
124 |
|
125 | return true; |
126 | } |
127 |
|