Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: query_string

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

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);