Welcome, visitor! Log in
 

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.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: 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.

Source View

Line Code
238                     unset( $error );
239
240                     if ( isset($perma_query_vars) && strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false )
241                          unset( $perma_query_vars );
242
243                     $this->did_permalink = false;
244                }
245           }
246
247           $this->public_query_vars = apply_filters('query_vars', $this->public_query_vars);
248
249           foreach ( $GLOBALS['wp_post_types'] as $post_type => $t )
250                if ( $t->query_var )
251                     $post_type_query_vars[$t->query_var] = $post_type;
252
253           foreach ( $this->public_query_vars as $wpvar ) {
254                if ( isset( $this->extra_query_vars[$wpvar] ) )
255                     $this->query_vars[$wpvar] = $this->extra_query_vars[$wpvar];
256                elseif ( isset( $_POST[$wpvar] ) )