wppaste
WordPress

apply_filters( 'comments_per_page', int $comments_per_page, string $comment_status )

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

Compatibility

WordPress
since 2.6.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$comments_per_pageint
The number of comments to list per page.
$comment_statusstring
The comment status name. Default 'All'.

Where this hook fires · 2

  • wp-admin/includes/class-wp-comments-list-table.php:222WP_Comments_List_Table::get_per_page()
  • wp-admin/includes/class-wp-screen.php:1263WP_Screen::render_per_page_options()

Source code

		 *		 * @since 2.6.0		 *		 * @param int    $comments_per_page The number of comments to list per page.		 * @param string $comment_status    The comment status name. Default 'All'.		 */		return apply_filters( 'comments_per_page', $comments_per_page, $comment_status );	} 	/**	 * Displays a message when no comments are found.	 * @global string $comment_status The current comment status filter.	 */

Changelog

Introduced in 2.6.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.