WP HOOKS
filtrod 4.9.0

pre_untrash_post

Args 3Plik wp-includes/post.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters whether a post untrashing should take place.

Parametry

ParametrTypOpis
$untrashbool | nullWhether to go forward with untrashing.
$post\WP_PostPost object.
$previous_statusstringThe 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
}

Popularne w tej kategorii