akcjaod 5.0.0
rest_after_insert_comment
Opis — z kodu źródłowego
Fires completely after a comment is created or updated via the REST API.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$comment | \WP_Comment | Inserted or updated comment object. |
$request | \WP_REST_Request | Request object. |
$creating | bool | True when creating a comment, false when updating. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'rest_after_insert_comment', '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( 'rest_after_insert_comment', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii