get_rest_url
get_rest_url ( $blog_id = null, $path = '/', $scheme = 'rest' )
Parameters:- (int|null) blog_id Optional. Blog ID. Default of null returns URL for current blog.
- (string) path Optional. REST route. Default '/'.
- (string) scheme Optional. Sanitization scheme. Default 'rest'.
Returns:- (string) Full URL to the endpoint.
Defined at: - Introduced in WordPress: 4.4.0
- Deprecated in WordPress: —
Description
Retrieves the URL to a REST endpoint on a site.Note: The returned URL is NOT escaped.