Summery Summery
Retrieves the URL to a REST endpoint.
Syntax Syntax
Description Description
Note: The returned URL is NOT escaped.
Parameters Parameters
- $path
-
(Optional) REST route.
Default value: ''
- $scheme
-
(Optional) Sanitization scheme. Default 'rest'.
Default value: 'rest'
Return Return
(string) Full URL to the endpoint.
Source Source
File: wp-includes/rest-api.php
* In this situation the home URL may be http:, and `is_ssl()` may be false, * but the admin is served over https: (one way or another), so REST API usage * will be blocked by browsers unless it is also served over HTTPS.
Advertisement
Changelog Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |