WP_Comments_List_Table::get_per_page() WordPress Method

The WP_Comments_List_Table::get_per_page() method is used to get the number of comments to show per page. By default, this is the value of the 'comments_per_page' option.

WP_Comments_List_Table::get_per_page( string $comment_status = 'all' ) #


Parameters

$comment_status

(string)(Optional)

Default value: 'all'


Top ↑

Return

(int)


Top ↑

Source

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

	public function get_per_page( $comment_status = 'all' ) {
		$comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' );

		/**
		 * Filters the number of comments listed per page in the comments list table.
		 *
		 * @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 );
	}

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.