WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )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.
This hook occurs 2 times in this file.
| Line | Code | 
|---|---|
| 78 |                $this->init(); | 
| 79 |                parse_str($query, $qv); | 
| 80 |                $this->query = $query; | 
| 81 |                $this->query_vars = $qv; | 
| 82 |           } | 
| 83 |  | 
| 84 |           if ('404' == $qv['error']) { | 
| 85 |                $this->is_404 = true; | 
| 86 |                if ( !empty($query) ) { | 
| 87 |                     do_action('parse_query', array(&$this)); | 
| 88 |                } | 
| 89 |                return; | 
| 90 |           } | 
| 91 |  | 
| 92 |           $qv['m'] =  (int) $qv['m']; | 
| 93 |           $qv['p'] =  (int) $qv['p']; | 
| 94 |  | 
| 95 |           // Compat.  Map subpost to attachment. | 
| 96 |           if ( '' != $qv['subpost'] ) | 
| Line | Code | 
| 235 |           if (strstr($_SERVER['PHP_SELF'], 'wp-admin/')) { | 
| 236 |                $this->is_admin = true; | 
| 237 |           } | 
| 238 |  | 
| 239 |           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)) { | 
| 240 |                $this->is_home = true; | 
| 241 |           } | 
| 242 |  | 
| 243 |           if ( !empty($query) ) { | 
| 244 |                do_action('parse_query', array(&$this)); | 
| 245 |           } | 
| 246 |      } | 
| 247 |  | 
| 248 |      function set_404() { | 
| 249 |           $is_feed = $this->is_feed; | 
| 250 |  | 
| 251 |           $this->init_query_flags(); | 
| 252 |           $this->is_404 = true; | 
| 253 |  |