WordPress开发者和主题制作者的搜索引擎



rest_url ›

Since4.4.0
已弃用n/a
rest_url ( $path = '', $scheme = 'json' )
参数: (2)
  • (string) $path Optional. REST route. Default empty.
    Required: No
    默认: (empty)
  • (string) $scheme Optional. Sanitization scheme. Default 'json'.
    Required: No
    默认: 'json'
返回:
  • (string) Full URL to the endpoint.
定义在:
文档:

Retrieves the URL to a REST endpoint.

Note: The returned URL is NOT escaped.



源码

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