edit_posts_per_page filter-hookWP 2.8.0

Filters the number of posts displayed per page when specifically listing "posts".

Usage

add_filter( 'edit_posts_per_page', 'wp_kama_edit_posts_per_page_filter', 10, 2 );

/**
 * Function for `edit_posts_per_page` filter-hook.
 * 
 * @param int    $posts_per_page Number of posts to be displayed.
 * @param string $post_type      The post type.
 *
 * @return int
 */
function wp_kama_edit_posts_per_page_filter( $posts_per_page, $post_type ){

	// filter...
	return $posts_per_page;
}
$posts_per_page(int)
Number of posts to be displayed.
Default: 20
$post_type(string)
The post type.

Changelog

Since 2.8.0 Introduced.

Where the hook is called

wp_edit_posts_query()
edit_posts_per_page
WP_Posts_List_Table::prepare_items()
edit_posts_per_page
WP_Screen::render_per_page_options()
edit_posts_per_page
wp-admin/includes/post.php 1222
$posts_per_page = apply_filters( 'edit_posts_per_page', $posts_per_page, $post_type );
wp-admin/includes/class-wp-posts-list-table.php 177
$per_page = apply_filters( 'edit_posts_per_page', $per_page, $post_type );
wp-admin/includes/class-wp-screen.php 1266
$per_page = apply_filters( 'edit_posts_per_page', $per_page, $this->post_type );

Where the hook is used in WordPress

Usage not found.