From 386a5c397fcfb3a729f7efc09df0c089b02efe12 Mon Sep 17 00:00:00 2001 From: Rachel Baker Date: Fri, 29 Dec 2017 18:21:52 +0000 Subject: [PATCH] Comments: Introduce filter for the arguments for the comment query in the comments list table. Add `comments_list_table_query_args` filter to the Comments List Table. Props soulseekah, birgire. Fixes #42997. Built from https://develop.svn.wordpress.org/trunk@42420 git-svn-id: http://core.svn.wordpress.org/trunk@42251 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-comments-list-table.php | 9 +++++++++ wp-includes/version.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php index 071313903e..e64086d525 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/wp-admin/includes/class-wp-comments-list-table.php @@ -134,6 +134,15 @@ class WP_Comments_List_Table extends WP_List_Table { 'post_type' => $post_type, ); + /** + * Filters the arguments for the comment query in the comments list table. + * + * @since 5.0.0 + * + * @param array $args An array of get_comments() arguments. + */ + $args = apply_filters( 'comments_list_table_query_args', $args ); + $_comments = get_comments( $args ); if ( is_array( $_comments ) ) { update_comment_cache( $_comments ); diff --git a/wp-includes/version.php b/wp-includes/version.php index ed39cdd43a..8e224ee812 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42419'; +$wp_version = '5.0-alpha-42420'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.