handle_bulk_actions-(screen_id) filter-hookWP 4.7.0

Fires when a custom bulk action should be handled.

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

The dynamic portion of the hook name, $screen, refers to the current screen ID.

Usage

add_filter( 'handle_bulk_actions-(screen_id)', 'wp_kama_handle_bulk_actions_screen_id_filter', 10, 3 );

/**
 * Function for `handle_bulk_actions-(screen_id)` filter-hook.
 * 
 * @param string $sendback The redirect URL.
 * @param string $doaction The action being taken.
 * @param array  $items    The items to take the action on. Accepts an array of IDs of posts, comments, terms, links, plugins, attachments, or users.
 *
 * @return string
 */
function wp_kama_handle_bulk_actions_screen_id_filter( $sendback, $doaction, $items ){

	// filter...
	return $sendback;
}
$sendback(string)
The redirect URL.
$doaction(string)
The action being taken.
$items(array)
The items to take the action on. Accepts an array of IDs of posts, comments, terms, links, plugins, attachments, or users.

Changelog

Since 4.7.0 Introduced.

Where the hook is called

In file: /wp-admin/edit.php
handle_bulk_actions-(screen_id)
wp-admin/edit.php 212
$sendback = apply_filters( "handle_bulk_actions-{$screen}", $sendback, $doaction, $post_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
wp-admin/edit-comments.php 96
$redirect_to = apply_filters( "handle_bulk_actions-{$screen}", $redirect_to, $doaction, $comment_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
wp-admin/users.php 511
$sendback = apply_filters( "handle_bulk_actions-{$screen}", $sendback, $wp_list_table->current_action(), $userids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
wp-admin/edit-tags.php 207
$location = apply_filters( "handle_bulk_actions-{$screen}", $location, $wp_list_table->current_action(), $tags ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
wp-admin/link-manager.php 38
$redirect_to = apply_filters( "handle_bulk_actions-{$screen}", $redirect_to, $doaction, $bulklinks ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
wp-admin/upload.php 207
$location = apply_filters( "handle_bulk_actions-{$screen}", $location, $doaction, $post_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
wp-admin/plugins.php 526
$sendback = apply_filters( "handle_bulk_actions-{$screen}", $sendback, $action, $plugins ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores

Where the hook is used in WordPress

Usage not found.