Ticket #34300: 34300.patch
File 34300.patch, 4.4 KB (added by , 10 years ago) |
---|
-
src/wp-includes/link-template.php
2920 2920 * 2921 2921 * @since 3.0.0 2922 2922 * 2923 * @param string $path Optional. Path relative to the home url. Default empty.2924 * @param string $scheme Optional. Scheme to give the home url context. Accepts2925 * 'http', 'https', or 'relative'. Default null.2923 * @param string $path Optional. Path relative to the home url. Default empty. 2924 * @param string|null $scheme Optional. Scheme to give the home url context. Accepts 2925 * 'http', 'https', 'relative', 'rest', or null. Default null. 2926 2926 * @return string Home url link with optional path appended. 2927 2927 */ 2928 2928 function home_url( $path = '', $scheme = null ) { … … 2944 2944 * @param int $blog_id Optional. Blog ID. Default null (current blog). 2945 2945 * @param string $path Optional. Path relative to the home URL. Default empty. 2946 2946 * @param string|null $orig_scheme Optional. Scheme to give the home URL context. Accepts 2947 * 'http', 'https', 'relative', or null. Default null.2947 * 'http', 'https', 'relative', 'rest', or null. Default null. 2948 2948 * @return string Home URL link with optional path appended. 2949 2949 */ 2950 2950 function get_home_url( $blog_id = null, $path = '', $scheme = null ) { … … 2979 2979 * 2980 2980 * @param string $url The complete home URL including scheme and path. 2981 2981 * @param string $path Path relative to the home URL. Blank string if no path is specified. 2982 * @param string|null $orig_scheme Scheme to give the home URL context. Accepts 'http', 'https', 'relative' or null. 2982 * @param string|null $orig_scheme Scheme to give the home URL context. Accepts 'http', 'https', 2983 * 'relative', 'rest', or null. 2983 2984 * @param int|null $blog_id Blog ID, or null for the current blog. 2984 2985 */ 2985 2986 return apply_filters( 'home_url', $url, $path, $orig_scheme, $blog_id ); … … 3360 3361 * 3361 3362 * @since 3.4.0 3362 3363 * 3363 * @param string $url Absolute url that includes a scheme 3364 * @param string $scheme Optional. Scheme to give $url. Currently 'http', 'https', 'login', 'login_post', 'admin', or 'relative'. 3364 * @param string $url Absolute url that includes a scheme 3365 * @param string|null $scheme Optional. Scheme to give $url. Currently 'http', 'https', 'login', 3366 * 'login_post', 'admin', 'relative', 'rest', 'rpc', or null. Default is 3367 * null. 3365 3368 * @return string $url URL with chosen scheme. 3366 3369 */ 3367 3370 function set_url_scheme( $url, $scheme = null ) { … … 3392 3395 * 3393 3396 * @since 3.4.0 3394 3397 * 3395 * @param string $url The complete URL including scheme and path.3396 * @param string $scheme Scheme applied to the URL. One of 'http', 'https', or 'relative'.3397 * @param string $orig_scheme Scheme requested for the URL. One of 'http', 'https', 'login',3398 * 'login_post', 'admin', 'rpc', or 'relative'.3398 * @param string $url The complete URL including scheme and path. 3399 * @param string $scheme Scheme applied to the URL. One of 'http', 'https', or 'relative'. 3400 * @param string|null $orig_scheme Scheme requested for the URL. One of 'http', 'https', 'login', 3401 * 'login_post', 'admin', 'relative', 'rest', 'rpc', or null. 3399 3402 */ 3400 3403 return apply_filters( 'set_url_scheme', $url, $scheme, $orig_scheme ); 3401 3404 } -
src/wp-includes/rest-api/rest-functions.php
235 235 * 236 236 * @param int $blog_id Optional. Blog ID. Default of null returns URL for current blog. 237 237 * @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'. 239 239 * @return string Full URL to the endpoint. 240 240 */ 241 function get_rest_url( $blog_id = null, $path = '/', $scheme = ' json' ) {241 function get_rest_url( $blog_id = null, $path = '/', $scheme = 'rest' ) { 242 242 if ( empty( $path ) ) { 243 243 $path = '/'; 244 244 }