Hard limit to 10 comments on edit post screen. Props greuben. fixes #15998

git-svn-id: http://svn.automattic.com/wordpress/trunk@17168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-12-29 15:58:46 +00:00
parent 1e5dc9a372
commit 9b3c2a5db3
1 changed files with 11 additions and 2 deletions

View File

@ -54,8 +54,7 @@ class WP_Comments_List_Table extends WP_List_Table {
$orderby = ( isset( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : '';
$order = ( isset( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : '';
$comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' );
$comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
$comments_per_page = $this->get_per_page( $comment_status );
$doing_ajax = defined( 'DOING_AJAX' ) && DOING_AJAX;
@ -116,6 +115,12 @@ class WP_Comments_List_Table extends WP_List_Table {
'per_page' => $comments_per_page,
) );
}
function get_per_page( $comment_status = 'all' ) {
$comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' );
$comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
return $comments_per_page;
}
function no_items() {
global $comment_status;
@ -536,6 +541,10 @@ class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
</table>
<?php
}
function get_per_page( $comment_status = false ) {
return 10;
}
}
?>