WP HOOKS
filtrod 4.4.0

wp_rest_server_class

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

Opis — z kodu źródłowego

Filters the REST Server Class.

This filter allows you to adjust the server class used by the REST API, using a different class to handle requests.

Parametry

ParametrTypOpis
$class_namestringThe name of the server class. Default 'WP_REST_Server'.

Wywołanie

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

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

Popularne w tej kategorii