diff --git src/wp-includes/rest-api/rest-functions.php src/wp-includes/rest-api/rest-functions.php
index 90bb2e7..909bf5e 100644
|
|
|
function rest_api_register_rewrites() { |
| 132 | 132 | /** |
| 133 | 133 | * Registers the default REST API filters. |
| 134 | 134 | * |
| 135 | | * @since 4.4.0 |
| | 135 | * Attached to the {@see 'rest_api_init'} action |
| | 136 | * to make testing and disabling these filters easier. |
| 136 | 137 | * |
| 137 | | * @internal This will live in default-filters.php |
| | 138 | * @since 4.4.0 |
| 138 | 139 | */ |
| 139 | 140 | function rest_api_default_filters() { |
| 140 | 141 | // Deprecated reporting. |
diff --git src/wp-includes/rest-api/rest-functions.php src/wp-includes/rest-api/rest-functions.php
index 909bf5e..275ca5f 100644
|
|
|
function get_rest_url( $blog_id = null, $path = '/', $scheme = 'rest' ) { |
| 255 | 255 | $url = add_query_arg( 'rest_route', $path, $url ); |
| 256 | 256 | } |
| 257 | 257 | |
| 258 | | if ( is_ssl() ) { |
| 259 | | // If the current host is the same as the REST URL host, force the REST URL scheme to HTTPS |
| 260 | | if ( $_SERVER['SERVER_NAME'] === parse_url( get_home_url( $blog_id ), PHP_URL_HOST ) ) { |
| 261 | | $url = set_url_scheme( $url, 'https' ); |
| 262 | | } |
| 263 | | } |
| | 258 | if ( is_ssl() ) { |
| | 259 | // If the current host is the same as the REST URL host, force the REST URL scheme to HTTPS |
| | 260 | if ( $_SERVER['SERVER_NAME'] === parse_url( get_home_url( $blog_id ), PHP_URL_HOST ) ) { |
| | 261 | $url = set_url_scheme( $url, 'https' ); |
| | 262 | } |
| | 263 | } |
| 264 | 264 | |
| 265 | 265 | /** |
| 266 | 266 | * Filter the REST URL. |