Admin: Allow for the consistent filtering of `auth_redirect_scheme`

Merge of [37651] to the 4.1 branch.

See #37047.

Built from https://develop.svn.wordpress.org/branches/4.1@37762


git-svn-id: http://core.svn.wordpress.org/branches/4.1@37727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Jeremy Felt 2016-06-21 14:13:23 +00:00
parent 2dbd645312
commit 8d2141b7ee
1 changed files with 8 additions and 12 deletions

View File

@ -1007,18 +1007,14 @@ function auth_redirect() {
} }
} }
if ( is_user_admin() ) {
$scheme = 'logged_in';
} else {
/** /**
* Filter the authentication redirect scheme. * Filters the authentication redirect scheme.
* *
* @since 2.9.0 * @since 2.9.0
* *
* @param string $scheme Authentication redirect scheme. Default empty. * @param string $scheme Authentication redirect scheme. Default empty.
*/ */
$scheme = apply_filters( 'auth_redirect_scheme', '' ); $scheme = apply_filters( 'auth_redirect_scheme', '' );
}
if ( $user_id = wp_validate_auth_cookie( '', $scheme) ) { if ( $user_id = wp_validate_auth_cookie( '', $scheme) ) {
/** /**