From cf137e7c1bc2a18e97b15a11a659decce042b029 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 30 Jul 2020 13:27:04 +0000 Subject: [PATCH] Comments: Pass the `$which` parameter to the `manage_comments_nav` action. This brings some consistency with the `manage_users_extra_tablenav` and `manage_users_extra_tablenav` actions. Props Tkama, wpgurudev. Fixes #50736. Built from https://develop.svn.wordpress.org/trunk@48693 git-svn-id: http://core.svn.wordpress.org/trunk@48455 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-comments-list-table.php | 8 +++++++- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php index 91b29c5c1f..eed0a795f0 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/wp-admin/includes/class-wp-comments-list-table.php @@ -390,7 +390,9 @@ class WP_Comments_List_Table extends WP_List_Table { if ( ! isset( $has_items ) ) { $has_items = $this->has_items(); } + echo '
'; + if ( 'top' === $which ) { ob_start(); @@ -415,14 +417,18 @@ 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 + * @since 5.6.0 The `$which` parameter was added. * * @param string $comment_status The comment status name. Default 'All'. + * @param string $which The location of the extra table nav markup: 'top' or 'bottom'. */ - do_action( 'manage_comments_nav', $comment_status ); + do_action( 'manage_comments_nav', $comment_status, $which ); + echo '
'; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 68df00519e..4e7aa84e8a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-48692'; +$wp_version = '5.6-alpha-48693'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.