Makes following changes to improve robustness of the login redirect
Use redirects without schema - on some PHP environments (kinsta) $_SERVER['REQUEST_SCHEMA'] is not available, so to make sure redirects work in those environments we omit schema from redirect links
Going directly to /wp-login.php redirects to home page after login, not wp-admin - This behavior used to depend on whether permalink structure was set to plain or pretty; this difference doesn't make sense and we should consolidate on always redirecting to home page, if someone wants to directly access the admin panel they should go to /wp-admin
Only use host for validating redirects, this had to be done, so the redirects without schema work.
Makes following changes to improve robustness of the login redirect
$_SERVER['REQUEST_SCHEMA']
is not available, so to make sure redirects work in those environments we omit schema from redirect links/wp-login.php
redirects to home page after login, notwp-admin
- This behavior used to depend on whether permalink structure was set to plain or pretty; this difference doesn't make sense and we should consolidate on always redirecting to home page, if someone wants to directly access the admin panel they should go to/wp-admin