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 |
---|---|
42 |
|
43 | $pagenum = isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 0; |
44 | if ( empty($pagenum) ) |
45 | $pagenum = 1; |
46 | $per_page = 'edit_' . $post_type . '_per_page'; |
47 | $per_page = (int) get_user_option( $per_page ); |
48 | if ( empty( $per_page ) || $per_page < 1 ) |
49 | $per_page = 20; |
50 | // @todo filter based on type |
51 | $per_page = apply_filters( 'edit_posts_per_page', $per_page ); |
52 |
|
53 | // Handle bulk actions |
54 | if ( isset($_GET['doaction']) || isset($_GET['doaction2']) || isset($_GET['delete_all']) || isset($_GET['delete_all2']) || isset($_GET['bulk_edit']) ) { |
55 | check_admin_referer('bulk-posts'); |
56 | $sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'ids'), wp_get_referer() ); |
57 |
|
58 | if ( strpos($sendback, 'post.php') !== false ) |
59 | $sendback = admin_url($post_new_file); |
60 |
|