akcjaod 5.6.0
wp_after_insert_post
Opis — z kodu źródłowego
Fires once a post, its terms and meta data has been saved.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$post_id | int | Post ID. |
$post | \WP_Post | Post object. |
$update | bool | Whether this is an existing post being updated. |
$post_before | null | \WP_Post | Null 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
}
// 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