filtrod 4.3.0
get_default_comment_status
Opis — z kodu źródłowego
Filters the default comment status for the given post type.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$status | string | Default status for the given post type, either 'open' or 'closed'. |
$post_type | string | Post type. Default is <code>post</code>. |
$comment_type | string | Type 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
}
// 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