rest_get_route_for_post


rest_get_route_for_post ( $post )

Parameters:
  • (int|WP_Post) post Post ID or post object.
Returns:
  • (string) The route path with a leading slash for the given post, or an empty string if there is not a route.
Defined at:

Description

Gets the REST API route for a post.

Related Functions

rest_get_route_for_term, rest_get_route_for_post_type_items, rest_get_route_for_taxonomy_items, _reset_front_page_settings_for_post, get_the_author_posts

Top Google Results

User discussions

wpseek mobile