WordPress at Your Fingertips
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_8896', 10, 2 );
function filter_function_name_8896( $route, $post ){
	// filter...

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

Changelog

Since 5.5.0 Introduced.

Where the hook is called

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

Where in WP core the hook is used WordPress

Usage not found.