$_SERVER['PHP_SELF'
] =
str_replace( $_SERVER['PATH_INFO'
], '',
$_SERVER['PHP_SELF'
] );
} $url =
dirname( set_url_scheme( 'http://' .
$_SERVER['HTTP_HOST'
] .
$_SERVER['PHP_SELF'
] ) );
if ( get_option( 'siteurl'
) !==
$url ) { update_option( 'siteurl',
$url );
}}// Set a cookie now to see if they are supported by the browser.
$secure =
( 'https' ===
parse_url( wp_login_url(), PHP_URL_SCHEME
) );
setcookie( TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN,
$secure );
if ( SITECOOKIEPATH !== COOKIEPATH
) { setcookie( TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN,
$secure );
}if ( isset( $_GET['wp_lang'
] ) ) { setcookie( 'wp_lang',
sanitize_text_field( $_GET['wp_lang'
] ), 0, COOKIEPATH, COOKIE_DOMAIN,
$secure );
}/**
* Fires when the login form is initialized.
*
* @since 3.2.0
*/