comments_per_page filter allows you to define the number of comments to list per page in the comments list table.
It is evaluated in:
WP_Comments_List_Table::get_per_page()in the wp-admin/includes/class-wp-comments-list-table.php file
WP_Screen::render_per_page_options()in the wp-admin/includes/screen.php file
comments_per_page accepts 2 arguments:
$comments_per_pageThe number of comments to list per page.
$comment_statusThe comment status name. Default is ‘all’.
I don’t know about you, but when I go to clean out spam comments, it’s irritating to have that extra step of upping the comments per page — the default is 20 — just so I can bulk-delete them faster. The following example raises the comments-per-page amount only when you’re in the ‘Spam’ filtered view.
View the code example on Gist.Have a suggested improvement? You can fork the Gist and comment back with the link. If all is agreeable, I’ll merge in your changes. Crowd-sourced documentation FTW!