IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 356 | 356 | global $wp_rewrite; |
| 357 | 357 | |
| 358 | 358 | if ( $wp_rewrite->using_index_permalinks() ) { |
| 359 | | $url = get_home_url( $blog_id, $wp_rewrite->index . '/' . rest_get_url_prefix(), $scheme ); |
| | 359 | $url = get_site_url( $blog_id, $wp_rewrite->index . '/' . rest_get_url_prefix(), $scheme ); |
| 360 | 360 | } else { |
| 361 | | $url = get_home_url( $blog_id, rest_get_url_prefix(), $scheme ); |
| | 361 | $url = get_site_url( $blog_id, rest_get_url_prefix(), $scheme ); |
| 362 | 362 | } |
| 363 | 363 | |
| 364 | 364 | $url .= $path; |
| 365 | 365 | } else { |
| 366 | | $url = trailingslashit( get_home_url( $blog_id, '', $scheme ) ); |
| | 366 | $url = trailingslashit( get_site_url( $blog_id, '', $scheme ) ); |
| 367 | 367 | // nginx only allows HTTP/1.0 methods when redirecting from / to /index.php |
| 368 | 368 | // To work around this, we manually add index.php to the URL, avoiding the redirect. |
| 369 | 369 | if ( 'index.php' !== substr( $url, 9 ) ) { |
| … |
… |
|
| 375 | 375 | |
| 376 | 376 | if ( is_ssl() ) { |
| 377 | 377 | // If the current host is the same as the REST URL host, force the REST URL scheme to HTTPS. |
| 378 | | if ( $_SERVER['SERVER_NAME'] === parse_url( get_home_url( $blog_id ), PHP_URL_HOST ) ) { |
| | 378 | if ( $_SERVER['SERVER_NAME'] === parse_url( get_site_url( $blog_id ), PHP_URL_HOST ) ) { |
| 379 | 379 | $url = set_url_scheme( $url, 'https' ); |
| 380 | 380 | } |
| 381 | 381 | } |