WP HOOKS
akcjaod 5.6.0

wp_after_insert_post

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

Opis — z kodu źródłowego

Fires once a post, its terms and meta data has been saved.

Parametry

ParametrTypOpis
$post_idintPost ID.
$post\WP_PostPost object.
$updateboolWhether this is an existing post being updated.
$post_beforenull | \WP_PostNull for new posts, the WP_Post object prior to the update for updated posts.

Wywołanie

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

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

Popularne w tej kategorii