filtrod 4.4.0
rest_endpoints
Opis — z kodu źródłowego
Filters the array of available REST API endpoints.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$endpoints | array | The available endpoints. An array of matching regex patterns, each mapped to an array of callbacks for the endpoint. These take the format <code>'/path/regex' => array( $callback, $bitmask )</code> or `'/path/regex' => array( array( $callback, $bitmask ). |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'rest_endpoints', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}
// rejestracja funkcji zwrotnej
add_filter( 'rest_endpoints', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii