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. git-svn-id: https://develop.svn.wordpress.org/trunk@48693 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bee24dc17c
commit
a7e5570da6
@ -390,7 +390,9 @@ class WP_Comments_List_Table extends WP_List_Table {
|
|||||||
if ( ! isset( $has_items ) ) {
|
if ( ! isset( $has_items ) ) {
|
||||||
$has_items = $this->has_items();
|
$has_items = $this->has_items();
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<div class="alignleft actions">';
|
echo '<div class="alignleft actions">';
|
||||||
|
|
||||||
if ( 'top' === $which ) {
|
if ( 'top' === $which ) {
|
||||||
ob_start();
|
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' );
|
$title = ( 'spam' === $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' );
|
||||||
submit_button( $title, 'apply', 'delete_all', false );
|
submit_button( $title, 'apply', 'delete_all', false );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fires after the Filter submit button for comment types.
|
* Fires after the Filter submit button for comment types.
|
||||||
*
|
*
|
||||||
* @since 2.5.0
|
* @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 $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 '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user