Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: query_vars

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
128                          unset($error);
129
130                     if (isset($perma_query_vars) && strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false)
131                          unset($perma_query_vars);
132
133                     $this->did_permalink = false;
134                }
135           }
136
137           $this->public_query_vars = apply_filters('query_vars', $this->public_query_vars);
138
139           for ($i=0; $i<count($this->public_query_vars); $i += 1) {
140                $wpvar = $this->public_query_vars[$i];
141                if (isset($this->extra_query_vars[$wpvar]))
142                     $this->query_vars[$wpvar] = $this->extra_query_vars[$wpvar];
143                elseif (isset($GLOBALS[$wpvar]))
144                     $this->query_vars[$wpvar] = $GLOBALS[$wpvar];
145                elseif (!empty($_POST[$wpvar]))
146                     $this->query_vars[$wpvar] = $_POST[$wpvar];