mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 23:58:03 +00:00
Docs: Update the default scheme for get_rest_url() from 'json' to 'rest'.
Also adds 'rest' to the documented list of schemes for `home_url()`, `get_home_url()`, `set_url_scheme()`, and the `home_url` and `set_url_scheme` hooks. Props rachelbaker. Fixes #34300. git-svn-id: https://develop.svn.wordpress.org/trunk@35274 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -235,10 +235,10 @@ function rest_get_url_prefix() {
|
||||
*
|
||||
* @param int $blog_id Optional. Blog ID. Default of null returns URL for current blog.
|
||||
* @param string $path Optional. REST route. Default '/'.
|
||||
* @param string $scheme Optional. Sanitization scheme. Default 'json'.
|
||||
* @param string $scheme Optional. Sanitization scheme. Default 'rest'.
|
||||
* @return string Full URL to the endpoint.
|
||||
*/
|
||||
function get_rest_url( $blog_id = null, $path = '/', $scheme = 'json' ) {
|
||||
function get_rest_url( $blog_id = null, $path = '/', $scheme = 'rest' ) {
|
||||
if ( empty( $path ) ) {
|
||||
$path = '/';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user