WP HOOKS
filtrod 4.7.0

rest_comment_trashable

Args 2Plik wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.phpDokumentacja WP ↗

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

ParametrTypOpis
$supports_trashboolWhether the comment supports trashing.
$comment\WP_CommentThe 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
}

Popularne w tej kategorii