diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php index 7b5d55cbc4..3223bdaedc 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/wp-admin/includes/class-wp-comments-list-table.php @@ -127,6 +127,14 @@ 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' ); + /** + * Filter 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'. + */ $comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status ); return $comments_per_page; } @@ -181,6 +189,14 @@ class WP_Comments_List_Table extends WP_List_Table { ) . ''; } + /** + * Filter the comment status links. + * + * @since 2.5.0 + * + * @param array $status_links An array of fully-formed status links. Default 'All'. + * Accepts 'All', 'Pending', 'Approved', 'Spam', and 'Trash'. + */ $status_links = apply_filters( 'comment_status_links', $status_links ); return $status_links; } @@ -219,6 +235,13 @@ class WP_Comments_List_Table extends WP_List_Table { 'post-query-submit' ) ); } @@ -238,6 +266,13 @@ class WP_Comments_List_Table extends WP_List_Table { $title = ( 'spam' == $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' ); submit_button( $title, 'apply', 'delete_all', false ); } + /** + * Fires after the Filter submit button for comment types. + * + * @since 2.5.0 + * + * @param string $comment_status The comment status name. Default 'All'. + */ do_action( 'manage_comments_nav', $comment_status ); echo ''; } @@ -374,7 +409,12 @@ class WP_Comments_List_Table extends WP_List_Table { comment_text(); if ( $user_can ) { ?>