mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 15:17:42 +02:00
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:
parent
1e5dc9a372
commit
9b3c2a5db3
@ -54,8 +54,7 @@ class WP_Comments_List_Table extends WP_List_Table {
|
|||||||
$orderby = ( isset( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : '';
|
$orderby = ( isset( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : '';
|
||||||
$order = ( isset( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : '';
|
$order = ( isset( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : '';
|
||||||
|
|
||||||
$comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' );
|
$comments_per_page = $this->get_per_page( $comment_status );
|
||||||
$comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
|
|
||||||
|
|
||||||
$doing_ajax = defined( 'DOING_AJAX' ) && DOING_AJAX;
|
$doing_ajax = defined( 'DOING_AJAX' ) && DOING_AJAX;
|
||||||
|
|
||||||
@ -117,6 +116,12 @@ class WP_Comments_List_Table extends WP_List_Table {
|
|||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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() {
|
function no_items() {
|
||||||
global $comment_status;
|
global $comment_status;
|
||||||
|
|
||||||
@ -536,6 +541,10 @@ class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
|
|||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_per_page( $comment_status = false ) {
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user