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
This commit is contained in:
Sergey Biryukov 2017-01-17 02:37:14 +00:00
parent e3ffbce181
commit 15346053d6
2 changed files with 3 additions and 2 deletions

View File

@ -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' ) );
}

View File

@ -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 );