akcjaod 5.9.0
rest_after_insert_nav_menu_item
Opis — z kodu źródłowego
Fires after a single menu item is completely created or updated via the REST API.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$nav_menu_item | object | Inserted or updated menu item object. |
$request | \WP_REST_Request | Request object. |
$creating | bool | True when creating a menu item, false when updating. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'rest_after_insert_nav_menu_item', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'rest_after_insert_nav_menu_item', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii