WordPress at a glance
filter is not described

rest_route_for_post filter-hook . WP 5.5.0

Filters the REST API route for a post.

Usage

add_filter( 'rest_route_for_post', 'filter_function_name_1775', 10, 2 );
function filter_function_name_1775( $route, $post ){
	// filter...

	return $route;
}
$route(string)
The route path.
$post(WP_Post)
The post object.

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

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

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

rest_get_route_for_post()
rest_route_for_post
wp-includes/rest-api.php 2186
return apply_filters( 'rest_route_for_post', $route, $post );

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

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