filtrod 5.1.0
allow_empty_comment
Opis — z kodu źródłowego
Filters whether an empty comment should be allowed.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$allow_empty_comment | bool | Whether to allow empty comments. Default false. |
$commentdata | array | Array of comment data to be sent to wp_insert_comment(). |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'allow_empty_comment', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'allow_empty_comment', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii