IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
148 | 148 | // No site has been found, bail. |
149 | 149 | if ( empty( $current_blog ) ) { |
150 | 150 | // We're going to redirect to the network URL, with some possible modifications. |
151 | | $scheme = is_ssl() ? 'https' : 'http'; |
152 | | $destination = "$scheme://{$current_site->domain}{$current_site->path}"; |
| 151 | $destination = wp_get_protocol() . $current_site->domain . $current_site->path; |
153 | 152 | |
154 | 153 | /** |
155 | 154 | * Fires when a network can be determined but a site cannot. |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
61 | 61 | |
62 | 62 | if ( ! $requested_url && isset( $_SERVER['HTTP_HOST'] ) ) { |
63 | 63 | // build the URL in the address bar |
64 | | $requested_url = is_ssl() ? 'https://' : 'http://'; |
| 64 | $requested_url = wp_get_protocol(); |
65 | 65 | $requested_url .= $_SERVER['HTTP_HOST']; |
66 | 66 | $requested_url .= $_SERVER['REQUEST_URI']; |
67 | 67 | } |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
406 | 406 | $defaults = array( |
407 | 407 | 'echo' => true, |
408 | 408 | // Default 'redirect' value takes the user back to the request URI. |
409 | | 'redirect' => ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], |
| 409 | 'redirect' => wp_get_protocol() . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], |
410 | 410 | 'form_id' => 'loginform', |
411 | 411 | 'label_username' => __( 'Username' ), |
412 | 412 | 'label_password' => __( 'Password' ), |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
351 | 351 | return; |
352 | 352 | } |
353 | 353 | |
354 | | $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; |
| 354 | $current_url = wp_get_protocol() . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; |
355 | 355 | $customize_url = add_query_arg( 'url', urlencode( $current_url ), wp_customize_url() ); |
356 | 356 | |
357 | 357 | $wp_admin_bar->add_menu( array( |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
3386 | 3386 | $orig_scheme = $scheme; |
3387 | 3387 | |
3388 | 3388 | if ( ! $scheme ) { |
3389 | | $scheme = is_ssl() ? 'https' : 'http'; |
| 3389 | $scheme = wp_get_protocol( false ); |
3390 | 3390 | } elseif ( $scheme === 'admin' || $scheme === 'login' || $scheme === 'login_post' || $scheme === 'rpc' ) { |
3391 | 3391 | $scheme = is_ssl() || force_ssl_admin() ? 'https' : 'http'; |
3392 | 3392 | } elseif ( $scheme !== 'http' && $scheme !== 'https' && $scheme !== 'relative' ) { |
3393 | | $scheme = is_ssl() ? 'https' : 'http'; |
| 3393 | $scheme = wp_get_protocol( false ); |
3394 | 3394 | } |
3395 | 3395 | |
3396 | 3396 | $url = trim( $url ); |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
24 | 24 | public function __get( $name ) { |
25 | 25 | switch ( $name ) { |
26 | 26 | case 'proto' : |
27 | | return is_ssl() ? 'https://' : 'http://'; |
| 27 | return wp_get_protocol(); |
28 | 28 | |
29 | 29 | case 'menu' : |
30 | 30 | _deprecated_argument( 'WP_Admin_Bar', '3.3', 'Modify admin bar nodes with WP_Admin_Bar::get_node(), WP_Admin_Bar::add_node(), and WP_Admin_Bar::remove_node(), not the <code>menu</code> property.' ); |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
3965 | 3965 | } |
3966 | 3966 | |
3967 | 3967 | /** |
| 3968 | * Return protocol |
| 3969 | * |
| 3970 | * @since 4.5.0 |
| 3971 | * |
| 3972 | * @param bool $slashes Add `://` after protocol. Default true. |
| 3973 | * |
| 3974 | * @return string |
| 3975 | */ |
| 3976 | function wp_get_protocol( $slashes = true ) { |
| 3977 | return ( is_ssl() ? 'https' : 'http' ) . ( $slashes ? '://' : '' ); |
| 3978 | } |
| 3979 | |
| 3980 | /** |
3968 | 3981 | * Whether to force SSL used for the Administration Screens. |
3969 | 3982 | * |
3970 | 3983 | * @since 2.6.0 |
… |
… |
|
4028 | 4041 | } |
4029 | 4042 | } |
4030 | 4043 | |
4031 | | $schema = is_ssl() ? 'https://' : 'http://'; // set_url_scheme() is not defined yet |
4032 | | $url = $schema . $_SERVER['HTTP_HOST'] . $path; |
| 4044 | $url = wp_get_protocol() . $_SERVER['HTTP_HOST'] . $path; |
4033 | 4045 | } |
4034 | 4046 | |
4035 | 4047 | return rtrim($url, '/'); |
… |
… |
|
4952 | 4964 | */ |
4953 | 4965 | function wp_auth_check_html() { |
4954 | 4966 | $login_url = wp_login_url(); |
4955 | | $current_domain = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST']; |
| 4967 | $current_domain = wp_get_protocol() . $_SERVER['HTTP_HOST']; |
4956 | 4968 | $same_domain = ( strpos( $login_url, $current_domain ) === 0 ); |
4957 | 4969 | |
4958 | 4970 | /** |