mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 15:17:42 +02:00
REST API: Consistently default URL scheme to "rest", not "json".
The "json" scheme is a holdover from the pre-merge plugin version of the REST API, and was corrected elsewhere in core in [34300]. Only "rest" is officially supported in `set_url_scheme()`. Props DrewAPicture, rmccue. Fixes #45169. Built from https://develop.svn.wordpress.org/trunk@46233 git-svn-id: http://core.svn.wordpress.org/trunk@46045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e36d1bcbd8
commit
6da9c88729
@ -411,10 +411,10 @@ function get_rest_url( $blog_id = null, $path = '/', $scheme = 'rest' ) {
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param string $path Optional. REST route. Default empty.
|
||||
* @param string $scheme Optional. Sanitization scheme. Default 'json'.
|
||||
* @param string $scheme Optional. Sanitization scheme. Default 'rest'.
|
||||
* @return string Full URL to the endpoint.
|
||||
*/
|
||||
function rest_url( $path = '', $scheme = 'json' ) {
|
||||
function rest_url( $path = '', $scheme = 'rest' ) {
|
||||
return get_rest_url( null, $path, $scheme );
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.3-alpha-46232';
|
||||
$wp_version = '5.3-alpha-46233';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user