WP HOOKS
akcjaod 5.8.0

rest_delete_widget

Args 4Plik wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Fires after a widget is deleted via the REST API.

Parametry

ParametrTypOpis
$widget_idstringID of the widget marked for deletion.
$sidebar_idstringID of the sidebar the widget was deleted from.
$response\WP_REST_Response | \WP_ErrorThe response data, or WP_Error object on failure.
$request\WP_REST_RequestThe request sent to the API.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'rest_delete_widget', 'twoja_funkcja', 10, 4 );

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

Popularne w tej kategorii