WP HOOKS
filtrod 6.5.0

wp_is_rest_endpoint

Args 1Plik wp-includes/rest-api.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters whether a REST endpoint request is currently being handled.

This may be a standalone REST API request, or an internal request dispatched from within a regular page load.

Parametry

ParametrTypOpis
$is_request_endpointboolWhether a REST endpoint request is currently being handled.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'wp_is_rest_endpoint', 'twoja_funkcja' );

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

Popularne w tej kategorii