rest_get_route_for_post_type_items
rest_get_route_for_post_type_items ( $post_type )
Parameters:- (string) post_type The name of a registered post type.
Returns:- (string) The route path with a leading slash for the given post type, or an empty string if there is not a route.
Defined at: - Introduced in WordPress: 5.9.0
- Deprecated in WordPress: —
Description
Gets the REST API route for a post type.