handle_network_bulk_actions-{$screen}
Filter HookDescription
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.Hook Information
File Location |
wp-admin/network/site-themes.php
View on GitHub
|
Hook Type | Filter |
Line Number | 139 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$redirect_url
|
The redirect URL. |
string
|
$action
|
The action being taken. |
array
|
$items
|
The items to take the action on. |
int
|
$site_id
|
The site ID. |
Usage Examples
Basic Usage
<?php
// Hook into handle_network_bulk_actions-{$screen}
add_filter('handle_network_bulk_actions-{$screen}', 'my_custom_filter', 10, 4);
function my_custom_filter($redirect_url, $action, $items, $site_id) {
// Your custom filtering logic here
return $redirect_url;
}
Source Code Context
wp-admin/network/site-themes.php:139
- How this hook is used in WordPress core
<?php
134 * @param string $redirect_url The redirect URL.
135 * @param string $action The action being taken.
136 * @param array $items The items to take the action on.
137 * @param int $site_id The site ID.
138 */
139 $referer = apply_filters( "handle_network_bulk_actions-{$screen}", $referer, $action, $themes, $id ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
140 } else {
141 $action = 'error';
142 $n = 'none';
143 }
144 }
PHP Documentation
<?php
/**
* 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.
*
* @since 4.7.0
*
* @param string $redirect_url The redirect URL.
* @param string $action The action being taken.
* @param array $items The items to take the action on.
* @param int $site_id The site ID.
*/
Quick Info
- Hook Type: Filter
- Parameters: 4
- File: wp-admin/network/site-themes.php
Related Hooks
Related hooks will be displayed here in future updates.