WP HOOKS
filtrdynamicznyod 4.7.0

handle_bulk_actions-{$screen}

Args 3Plik wp-admin/edit.php

Opis — z kodu źródłowego

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.

Parametry

ParametrTypOpis
$sendbackstringThe redirect URL.
$doactionstringThe action being taken.
$itemsarrayThe items to take the action on. Accepts an array of IDs of posts, comments, terms, links, plugins, attachments, or users.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'handle_bulk_actions-{$screen}', 'twoja_funkcja', 10, 3 );

function twoja_funkcja($param_1, $param_2, $param_3) {
	// Twój kod
}

Popularne w tej kategorii