akcjaod 4.7.0
rest_delete_revision
Opis — z kodu źródłowego
Fires after a revision is deleted via the REST API.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$result | \WP_Post | false | null | The revision object (if it was deleted or moved to the Trash successfully) or false or null (failure). If the revision was moved to the Trash, $result represents its new state; if it was deleted, $result represents its state before deletion. |
$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_revision', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'rest_delete_revision', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii