Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: parse_query

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

This hook occurs 2 times in this file.

Line Code
77                $this->init();
78                parse_str($query, $qv);
79                $this->query = $query;
80                $this->query_vars = $qv;
81           }
82
83           if ('404' == $qv['error']) {
84                $this->is_404 = true;
85                if ( !empty($query) ) {
86                     do_action('parse_query', array(&$this));
87                }
88                return;
89           }
90
91           $qv['m'] =  (int) $qv['m'];
92           $qv['p'] =  (int) $qv['p'];
93
94           // Compat.  Map subpost to attachment.
95           if ( '' != $qv['subpost'] )
 
Line Code
229           if (strstr($_SERVER['PHP_SELF'], 'wp-admin/')) {
230                $this->is_admin = true;
231           }
232
233           if ( ! ($this->is_attachment || $this->is_archive || $this->is_single || $this->is_page || $this->is_search || $this->is_feed || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_comments_popup)) {
234                $this->is_home = true;
235           }
236
237           if ( !empty($query) ) {
238                do_action('parse_query', array(&$this));
239           }
240      }
241
242      function set_404() {
243           $this->init_query_flags();
244           $this->is_404 = true;     
245      }
246      
247      function get($query_var) {