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

git-svn-id: https://develop.svn.wordpress.org/trunk@17168 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-12-29 15:58:46 +00:00
parent 6e18c8f834
commit d554c850ac
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;
}
}
?>