mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 16:21:26 +01:00
Prevent bulk actions from being performed when Filter button is clicked.
props jesin. fixes #28555. Built from https://develop.svn.wordpress.org/trunk@28916 git-svn-id: http://core.svn.wordpress.org/trunk@28715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c8adae8ec7
commit
5f0b156155
@ -258,7 +258,7 @@ class WP_Comments_List_Table extends WP_List_Table {
|
||||
* @since 3.5.0
|
||||
*/
|
||||
do_action( 'restrict_manage_comments' );
|
||||
submit_button( __( 'Filter' ), 'button', false, false, array( 'id' => 'post-query-submit' ) );
|
||||
submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
|
||||
}
|
||||
|
||||
if ( ( 'spam' == $comment_status || 'trash' == $comment_status ) && current_user_can( 'moderate_comments' ) ) {
|
||||
|
@ -69,7 +69,7 @@ class WP_Links_List_Table extends WP_List_Table {
|
||||
'orderby' => 'name',
|
||||
);
|
||||
wp_dropdown_categories( $dropdown_options );
|
||||
submit_button( __( 'Filter' ), 'button', false, false, array( 'id' => 'post-query-submit' ) );
|
||||
submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
|
@ -384,6 +384,9 @@ class WP_List_Table {
|
||||
* @return string|bool The action name or False if no action was selected
|
||||
*/
|
||||
public function current_action() {
|
||||
if ( isset( $_REQUEST['filter_action'] ) && ! empty( $_REQUEST['filter_action'] ) )
|
||||
return false;
|
||||
|
||||
if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] )
|
||||
return $_REQUEST['action'];
|
||||
|
||||
|
@ -94,7 +94,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' );
|
||||
submit_button( __( 'Filter' ), 'button', false, false, array( 'id' => 'post-query-submit' ) );
|
||||
submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
|
||||
}
|
||||
|
||||
if ( $this->detached ) {
|
||||
|
@ -233,7 +233,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
*/
|
||||
do_action( 'restrict_manage_posts' );
|
||||
|
||||
submit_button( __( 'Filter' ), 'button', false, false, array( 'id' => 'post-query-submit' ) );
|
||||
submit_button( __( 'Filter' ), 'button', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
|
||||
}
|
||||
|
||||
if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_others_posts ) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user