comments_per_page WordPress Filter Hook

The comments_per_page Wordpress hook allows you to set the number of comments that are displayed on a page. This can be useful if you want to control the amount of comments that are displayed on your site.

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

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


Parameters

$comments_per_page

(int)The number of comments to list per page.

$comment_status

(string)The comment status name. Default 'All'.


Top ↑

Source

File: wp-admin/includes/class-wp-comments-list-table.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.