WordPress at a glance
filter is not described

rest_route_data filter-hook . WP 4.4.0

Filters the publicly-visible data for routes.

This data is exposed on indexes and can be used by clients or developers to investigate the site and find out how to use it. It acts as a form of self-documentation.


add_filter( 'rest_route_data', 'filter_function_name_6704', 10, 2 );
function filter_function_name_6704( $available, $routes ){
	// filter...

	return $available;
Route data to expose in indexes, keyed by route.
Internal route data as an associative array.

Список изменений

С версии 4.4.0 Введена.

Где вызывается хук

wp-includes/rest-api/class-wp-rest-server.php 1251
return apply_filters( 'rest_route_data', $available, $routes );

Где используется хук в ядре WP

Использование не найдено.