comments_per_page filter-hookWP 2.6.0

Filters the number of comments listed per page in the comments list table.

Usage

add_filter( 'comments_per_page', 'wp_kama_comments_per_page_filter', 10, 2 );

/**
 * Function for `comments_per_page` filter-hook.
 * 
 * @param int    $comments_per_page The number of comments to list per page.
 * @param string $comment_status    The comment status name.
 *
 * @return int
 */
function wp_kama_comments_per_page_filter( $comments_per_page, $comment_status ){

	// filter...
	return $comments_per_page;
}
$comments_per_page(int)
The number of comments to list per page.
$comment_status(string)
The comment status name.
Default: 'All'

Changelog

Since 2.6.0 Introduced.

Where the hook is called

WP_Comments_List_Table::get_per_page()
comments_per_page
WP_Screen::render_per_page_options()
comments_per_page
wp-admin/includes/class-wp-comments-list-table.php 212
return apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
wp-admin/includes/class-wp-screen.php 1254
$per_page = apply_filters( 'comments_per_page', $per_page, $comment_status );

Where the hook is used in WordPress

Usage not found.