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 |
|---|---|
| 162 | // Construct the query string. |
| 163 | $query_string = ''; |
| 164 | foreach (array_merge($wpvarstoreset, $more_wpvars) as $wpvar) { |
| 165 | if ($$wpvar != '') { |
| 166 | $query_string .= (strlen($query_string) < 1) ? '' : '&'; |
| 167 | $query_string .= $wpvar . '=' . rawurlencode($$wpvar); |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | $query_string = apply_filters('query_string', $query_string); |
| 172 | |
| 173 | update_category_cache(); |
| 174 | get_currentuserinfo(); |
| 175 | |
| 176 | // Call query posts to do the work. |
| 177 | $posts = & query_posts($query_string); |
| 178 | |
| 179 | // Extract updated query vars back into global namespace. |
| 180 | extract($wp_query->query_vars); |