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 |
---|---|
89 | global $post_type_object, $post_type, $avail_post_stati, $wp_query, $per_page, $mode; |
90 |
|
91 | $avail_post_stati = wp_edit_posts_query(); |
92 |
|
93 | $this->hierarchical_display = ( $post_type_object->hierarchical && 'menu_order title' == $wp_query->query['orderby'] ); |
94 |
|
95 | $total_items = $this->hierarchical_display ? $wp_query->post_count : $wp_query->found_posts; |
96 |
|
97 | $per_page = $this->get_items_per_page( 'edit_' . $post_type . '_per_page' ); |
98 | $per_page = apply_filters( 'edit_posts_per_page', $per_page, $post_type ); |
99 |
|
100 | if ( $this->hierarchical_display ) |
101 | $total_pages = ceil( $total_items / $per_page ); |
102 | else |
103 | $total_pages = $wp_query->max_num_pages; |
104 |
|
105 | $mode = empty( $_REQUEST['mode'] ) ? 'list' : $_REQUEST['mode']; |
106 |
|
107 | $this->is_trash = isset( $_REQUEST['post_status'] ) && $_REQUEST['post_status'] == 'trash'; |