From 15346053d6a5c835d58d45dad8a6e868f96b337b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 17 Jan 2017 02:37:14 +0000 Subject: [PATCH] List Tables: Pass the `$which` parameter to `restrict_manage_posts` filter instance in `WP_Media_List_Table`, missed in [37422]. Props wpsmith. Fixes #38772. git-svn-id: https://develop.svn.wordpress.org/trunk@39917 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-media-list-table.php | 2 +- src/wp-admin/includes/class-wp-posts-list-table.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/class-wp-media-list-table.php b/src/wp-admin/includes/class-wp-media-list-table.php index d0c24449f4..97b166e59c 100644 --- a/src/wp-admin/includes/class-wp-media-list-table.php +++ b/src/wp-admin/includes/class-wp-media-list-table.php @@ -172,7 +172,7 @@ class WP_Media_List_Table extends WP_List_Table { } /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */ - do_action( 'restrict_manage_posts', $this->screen->post_type ); + do_action( 'restrict_manage_posts', $this->screen->post_type, $which ); submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); } 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 836eff7be4..a0e4bfc8df 100644 --- a/src/wp-admin/includes/class-wp-posts-list-table.php +++ b/src/wp-admin/includes/class-wp-posts-list-table.php @@ -476,7 +476,8 @@ class WP_Posts_List_Table extends WP_List_Table { * * @param string $post_type The post type slug. * @param string $which The location of the extra table nav markup: - * 'top' or 'bottom'. + * 'top' or 'bottom' for WP_Posts_List_Table, + * 'bar' for WP_Media_List_Table. */ do_action( 'restrict_manage_posts', $this->screen->post_type, $which );