filtrod 4.7.0
rest_comment_trashable
Opis — z kodu źródłowego
Filters whether a comment can be trashed via the REST API.
Return false to disable trash support for the comment.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$supports_trash | bool | Whether the comment supports trashing. |
$comment | \WP_Comment | The comment object being considered for trashing support. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'rest_comment_trashable', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'rest_comment_trashable', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii