handle_bulk_actions-_id

Fires when a custom bulk action should be handled.

Description

apply_filters( 'handle_bulk_actions-_id', (string) $redirect_to, (string) $doaction, (array) $comment_ids ); 

The redirect link should be modified with success or failure feedback from the action to be used to display feedback to the user.

Parameters (3)

0. $redirect_to (string)
The redirect URL.
1. $doaction (string)
The action being taken.
2. $comment_ids (array)
The items to take the action on.

Usage

To run the hook, copy the example below.
  1. $redirect_to = apply_filters( 'handle_bulk_actions-_id', $redirect_to, $doaction, $comment_ids ); 
  2.  
  3. if ( !empty( $redirect_to ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the handle_bulk_actions-_id callback 
  2. function filter_handle_bulk_actions__id( $redirect_to, $doaction, $comment_ids ) { 
  3. // make filter magic happen here... 
  4. return $redirect_to
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'handle_bulk_actions-_id', 'filter_handle_bulk_actions__id', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'handle_bulk_actions-_id', 'filter_handle_bulk_actions__id', 10, 3 ); 

Defined (7)

The filter is defined in the following location(s).

/wp-admin/edit-comments.php  
  1. $redirect_to = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $redirect_to, $doaction, $comment_ids ); 
/wp-admin/edit.php  
  1. $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $post_ids ); 
/wp-admin/edit-tags.php  
  1. $location = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $location, $wp_list_table->current_action(), $tags ); 
/wp-admin/link-manager.php  
  1. $redirect_to = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $redirect_to, $doaction, $bulklinks ); 
/wp-admin/plugins.php  
  1. $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $action, $plugins ); 
/wp-admin/upload.php  
  1. $location = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $location, $doaction, $post_ids ); 
/wp-admin/users.php  
  1. $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $wp_list_table->current_action(), $userids );