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



rest_url › WordPress Function

Since4.4.0
已弃用n/a
rest_url ( $path = '', $scheme = 'rest' )
参数: (2)
  • (string) $path Optional. REST route. Default empty.
    Required: No
    默认: (empty)
  • (string) $scheme Optional. Sanitization scheme. Default 'rest'.
    Required: No
    默认: 'rest'
返回:
  • (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 = 'rest' ) {
	return get_rest_url( null, $path, $scheme );
}