A WordPress-centric search engine for devs and theme authors



rest_url ›

Since4.4.0
Deprecatedn/a
rest_url ( $path = '', $scheme = 'json' )
Parameters: (2)
  • (string) $path Optional. REST route. Default empty.
    Required: No
    Default: (empty)
  • (string) $scheme Optional. Sanitization scheme. Default 'json'.
    Required: No
    Default: 'json'
Returns:
  • (string) Full URL to the endpoint.
Defined at:
Codex:

Retrieves the URL to a REST endpoint.

Note: The returned URL is NOT escaped.



Source

function rest_url( $path = '', $scheme = 'json' ) {
	return get_rest_url( null, $path, $scheme );
}