akcjaod 5.8.0
rest_delete_widget
Opis — z kodu źródłowego
Fires after a widget is deleted via the REST API.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$widget_id | string | ID of the widget marked for deletion. |
$sidebar_id | string | ID of the sidebar the widget was deleted from. |
$response | \WP_REST_Response | \WP_Error | The response data, or WP_Error object on failure. |
$request | \WP_REST_Request | The 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
}
// 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