From ab3afd670dec0741f27fe6338347789b36bf0001 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Thu, 12 May 2016 15:12:11 +0000 Subject: [PATCH] List Tables: Pass the `$which` parameter to `restrict_manage_posts` and `restrict_manage_users`. `$which` contains the location of the extra table nav markup: 'top' or 'bottom'. Props martin.krcho. Fixes #35307. git-svn-id: https://develop.svn.wordpress.org/trunk@37422 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-posts-list-table.php | 5 ++++- src/wp-admin/includes/class-wp-users-list-table.php | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php index 33eca44a83..15c4b05bb2 100644 --- a/src/wp-admin/includes/class-wp-posts-list-table.php +++ b/src/wp-admin/includes/class-wp-posts-list-table.php @@ -446,10 +446,13 @@ class WP_Posts_List_Table extends WP_List_Table { * * @since 2.1.0 * @since 4.4.0 The `$post_type` parameter was added. + * @since 4.6.0 The `$which` parameter was added. * * @param string $post_type The post type slug. + * @param string $which The location of the extra table nav markup: + * 'top' or 'bottom'. */ - do_action( 'restrict_manage_posts', $this->screen->post_type ); + do_action( 'restrict_manage_posts', $this->screen->post_type, $which ); submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); } diff --git a/src/wp-admin/includes/class-wp-users-list-table.php b/src/wp-admin/includes/class-wp-users-list-table.php index ba619a44c2..903c7c7705 100644 --- a/src/wp-admin/includes/class-wp-users-list-table.php +++ b/src/wp-admin/includes/class-wp-users-list-table.php @@ -275,8 +275,11 @@ class WP_Users_List_Table extends WP_List_Table { * in the Users list table. * * @since 3.5.0 + * @since 4.6.0 The `$which` parameter was added. + * + * @param string $which The location of the extra table nav markup: 'top' or 'bottom'. */ - do_action( 'restrict_manage_users' ); + do_action( 'restrict_manage_users', $which ); echo ''; }