handle_network_bulk_actions-(screen_id) хук-фильтрWP 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.

Использование

add_filter( 'handle_network_bulk_actions-(screen_id)', 'wp_kama_handle_network_bulk_actions_screen_id_filter', 10, 4 );

/**
 * Function for `handle_network_bulk_actions-(screen_id)` filter-hook.
 * 
 * @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.
 *
 * @return string
 */
function wp_kama_handle_network_bulk_actions_screen_id_filter( $redirect_url, $action, $items, $site_id ){

	// filter...
	return $redirect_url;
}
$redirect_url(строка)
The redirect URL.
$action(строка)
The action being taken.
$items(массив)
The items to take the action on.
$site_id(int)
The site ID.

Список изменений

С версии 4.7.0 Введена.

Где вызывается хук

В файле: /wp-admin/network/site-themes.php
handle_network_bulk_actions-(screen_id)
wp-admin/network/site-themes.php 139
$referer = apply_filters( "handle_network_bulk_actions-{$screen}", $referer, $action, $themes, $id ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
wp-admin/network/sites.php 233
$redirect_to = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $redirect_to, $doaction, $blogs, $id ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
wp-admin/network/site-users.php 179
$referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $userids, $id ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
wp-admin/network/themes.php 282
$referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $themes ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
wp-admin/network/users.php 132
$sendback = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $user_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores

Где используется хук в WordPress

Использование не найдено.