Core Function
View Source on Trac ↗ rest_get_route_for_post_type_items()
rest_get_route_for_post_type_items( mixed $post_type ) Gets the REST API route for a post type.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $post_type string | The name of a registered post type. Required |
Return Value
(string)
string The route path with a leading slash for the given post type,
or an empty string if there is not a route.
Function Information
Since Version
5.9.0
Source File
wp-includes/rest-api.php
Advertisement