WP HOOKS
filtrod 4.3.0

get_default_comment_status

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

Opis — z kodu źródłowego

Filters the default comment status for the given post type.

Parametry

ParametrTypOpis
$statusstringDefault status for the given post type, either 'open' or 'closed'.
$post_typestringPost type. Default is <code>post</code>.
$comment_typestringType of comment. Default is <code>comment</code>.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_default_comment_status', 'twoja_funkcja', 10, 3 );

function twoja_funkcja($param_1, $param_2, $param_3) {
	// Twój kod
}

Popularne w tej kategorii