Retrieves the URL to a REST endpoint.
Note: The returned URL is NOT escaped.
$pathstringoptional
Default:''
$schemestringoptional
'rest'.Default:'rest'
function rest_url( $path = '', $scheme = 'rest' ) {
return get_rest_url( null, $path, $scheme );
}
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/rest_url