filtrod 6.5.0
wp_is_rest_endpoint
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
| Parametr | Typ | Opis |
|---|---|---|
$is_request_endpoint | bool | Whether 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
}
// rejestracja funkcji zwrotnej
add_filter( 'wp_is_rest_endpoint', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii