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
415
416           if ( ! empty($qv['robots']) ) {
417                $this->is_robots = true;
418                return;
419           }
420
421           if ('404' == $qv['error']) {
422                $this->is_404 = true;
423                if ( !empty($query) ) {
424                     do_action_ref_array('parse_query', array(&$this));
425                }
426                return;
427           }
428
429           $qv['p'] =  (int) $qv['p'];
430           $qv['page_id'] =  (int) $qv['page_id'];
431           $qv['year'] = (int) $qv['year'];
432           $qv['monthnum'] = (int) $qv['monthnum'];
433           $qv['day'] = (int) $qv['day'];
 
Line Code
607           }
608
609           if ( $this->is_posts_page && !$qv['withcomments'] )
610                $this->is_comment_feed = false;
611
612           $this->is_singular = $this->is_single || $this->is_page || $this->is_attachment;
613           // Done correcting is_* for page_on_front and page_for_posts
614
615           if ( !empty($query) )
616                do_action_ref_array('parse_query', array(&$this));
617      }
618
619      function set_404() {
620           $is_feed = $this->is_feed;
621
622           $this->init_query_flags();
623           $this->is_404 = true;
624
625           $this->is_feed = $is_feed;