filtrod 4.9.0
pre_untrash_post
Opis — z kodu źródłowego
Filters whether a post untrashing should take place.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$untrash | bool | null | Whether to go forward with untrashing. |
$post | \WP_Post | Post object. |
$previous_status | string | The status of the post at the point where it was trashed. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_untrash_post', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_untrash_post', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii