filtrod 6.8.0
rest_menu_read_access
Opis — z kodu źródłowego
Filters whether the current user has read access to menu items via the REST API.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$read_only_access | bool | Whether the current user has read access to menu items via the REST API. |
$request | \WP_REST_Request | Full details about the request. |
$controller | \WP_REST_Controller | The current instance of the controller. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'rest_menu_read_access', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'rest_menu_read_access', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii