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.
| Line | Code |
|---|---|
| 775 | $q['cat'] = isset($q['cat']) ? (int) $q['cat'] : 0; |
| 776 | $post_stati = array( // array( adj, noun ) |
| 777 | 'publish' => array(__('Published'), __('Published posts'), __ngettext_noop('Published <span class="count">(%s)</span>', 'Published <span class="count">(%s)</span>')), |
| 778 | 'future' => array(__('Scheduled'), __('Scheduled posts'), __ngettext_noop('Scheduled <span class="count">(%s)</span>', 'Scheduled <span class="count">(%s)</span>')), |
| 779 | 'pending' => array(__('Pending Review'), __('Pending posts'), __ngettext_noop('Pending Review <span class="count">(%s)</span>', 'Pending Review <span class="count">(%s)</span>')), |
| 780 | 'draft' => array(__('Draft'), _c('Drafts|manage posts header'), __ngettext_noop('Draft <span class="count">(%s)</span>', 'Drafts <span class="count">(%s)</span>')), |
| 781 | 'private' => array(__('Private'), __('Private posts'), __ngettext_noop('Private <span class="count">(%s)</span>', 'Private <span class="count">(%s)</span>')), |
| 782 | ); |
| 783 | |
| 784 | $post_stati = apply_filters('post_stati', $post_stati); |
| 785 | |
| 786 | $avail_post_stati = get_available_post_statuses('post'); |
| 787 | |
| 788 | $post_status_q = ''; |
| 789 | if ( isset($q['post_status']) && in_array( $q['post_status'], array_keys($post_stati) ) ) { |
| 790 | $post_status_q = '&post_status=' . $q['post_status']; |
| 791 | $post_status_q .= '&perm=readable'; |
| 792 | } |
| 793 | |