akcjaod 2.7.0
transition_comment_status
Opis — z kodu źródłowego
Fires when the comment status is in transition.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$new_status | string | The new comment status. |
$old_status | string | The old comment status. |
$comment | \WP_Comment | Comment object. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'transition_comment_status', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'transition_comment_status', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii