akcjaod 2.8.0
wp_insert_comment
Opis — z kodu źródłowego
Fires immediately after a comment is inserted into the database.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$id | int | The comment ID. |
$comment | \WP_Comment | Comment object. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'wp_insert_comment', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'wp_insert_comment', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii