WP HOOKS
filtrod 5.1.0

allow_empty_comment

Args 2Plik wp-includes/comment.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters whether an empty comment should be allowed.

Parametry

ParametrTypOpis
$allow_empty_commentboolWhether to allow empty comments. Default false.
$commentdataarrayArray 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
}

Popularne w tej kategorii