akcjaod 5.8.0
rest_after_save_widget
Opis — z kodu źródłowego
Fires after a widget is created or updated via the REST API.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$id | string | ID of the widget being saved. |
$sidebar_id | string | ID of the sidebar containing the widget being saved. |
$request | \WP_REST_Request | Request object. |
$creating | bool | True when creating a widget, false when updating. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'rest_after_save_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_after_save_widget', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii