WP HOOKS
akcjaod 3.3.0

wp_trash_post

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

Opis — z kodu źródłowego

Fires before a post is sent to the Trash.

Parametry

ParametrTypOpis
$post_idintPost ID.
$previous_statusstringThe status of the post about to be trashed.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'wp_trash_post', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii