WP HOOKS
filtrod 6.8.0

rest_menu_read_access

Args 3Plik wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters whether the current user has read access to menu items via the REST API.

Parametry

ParametrTypOpis
$read_only_accessboolWhether the current user has read access to menu items via the REST API.
$request\WP_REST_RequestFull details about the request.
$controller\WP_REST_ControllerThe 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
}

Popularne w tej kategorii