Make WordPress Core


Ignore:
Timestamp:
10/19/2015 10:38:03 PM (9 years ago)
Author:
DrewAPicture
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/rest-functions.php

    r35266 r35274  
    236236 * @param int    $blog_id Optional. Blog ID. Default of null returns URL for current blog.
    237237 * @param string $path    Optional. REST route. Default '/'.
    238  * @param string $scheme  Optional. Sanitization scheme. Default 'json'.
     238 * @param string $scheme  Optional. Sanitization scheme. Default 'rest'.
    239239 * @return string Full URL to the endpoint.
    240240 */
    241 function get_rest_url( $blog_id = null, $path = '/', $scheme = 'json' ) {
     241function get_rest_url( $blog_id = null, $path = '/', $scheme = 'rest' ) {
    242242    if ( empty( $path ) ) {
    243243        $path = '/';
Note: See TracChangeset for help on using the changeset viewer.