WPDev.one

rest_url()

rest_url( mixed $path = '', mixed $scheme = 'rest' )

Retrieves the URL to a REST endpoint.

Parameters 0 required

Name / Type Description
$path
string

Optional. REST route. Default empty.

$scheme
string

Optional. Sanitization scheme. Default 'rest'.

Return Value

(string)
Full URL to the endpoint.

Function Information

Since Version
4.4.0
Source File
wp-includes/rest-api.php
Advertisement