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 |
---|---|
135 | // is going to call wp() |
136 | $avail_post_stati = wp_edit_posts_query(); |
137 |
|
138 | $this->set_hierarchical_display( is_post_type_hierarchical( $this->screen->post_type ) && 'menu_order title' === $wp_query->query['orderby'] ); |
139 |
|
140 | $post_type = $this->screen->post_type; |
141 | $per_page = $this->get_items_per_page( 'edit_' . $post_type . '_per_page' ); |
142 |
|
143 | /** This filter is documented in wp-admin/includes/post.php */ |
144 | $per_page = apply_filters( 'edit_posts_per_page', $per_page, $post_type ); |
145 |
|
146 | if ( $this->hierarchical_display ) { |
147 | $total_items = $wp_query->post_count; |
148 | } elseif ( $wp_query->found_posts || $this->get_pagenum() === 1 ) { |
149 | $total_items = $wp_query->found_posts; |
150 | } else { |
151 | $post_counts = (array) wp_count_posts( $post_type, 'readable' ); |
152 |
|
153 | if ( isset( $_REQUEST['post_status'] ) && in_array( $_REQUEST['post_status'] , $avail_post_stati ) ) { |