The 'restrict_manage_posts' hook currently fires on the Post and Media list tables, but is passed zero arguments. Pass $post_type.

Props sunnyratilal, scribu.
Fixes #17891.


git-svn-id: https://develop.svn.wordpress.org/trunk@33644 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-08-19 06:22:40 +00:00
parent 80b6f4efca
commit 5cbc7a706d
2 changed files with 7 additions and 4 deletions

View File

@ -148,7 +148,8 @@ 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' );
do_action( 'restrict_manage_posts', $this->screen->post_type );
submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
}

View File

@ -333,8 +333,10 @@ class WP_Posts_List_Table extends WP_List_Table {
* Posts list table, and sorting by date on the Pages list table.
*
* @since 2.1.0
*
* @param string $post_type The post type slug.
*/
do_action( 'restrict_manage_posts' );
do_action( 'restrict_manage_posts', $this->screen->post_type );
submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
}
@ -1513,8 +1515,8 @@ class WP_Posts_List_Table extends WP_List_Table {
*
* @since 2.7.0
*
* @param string $column_name Name of the column to edit.
* @param WP_Post $post_type The post type slug.
* @param string $column_name Name of the column to edit.
* @param string $post_type The post type slug.
*/
do_action( 'quick_edit_custom_box', $column_name, $screen->post_type );
}