Admin: Allow for the consistent filtering of `auth_redirect_scheme`
Merge of [37651] to the 3.7 branch. See #37047. Built from https://develop.svn.wordpress.org/branches/3.7@37766 git-svn-id: http://core.svn.wordpress.org/branches/3.7@37731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5543fabff3
commit
5e739be4f6
|
@ -758,10 +758,14 @@ function auth_redirect() {
|
|||
}
|
||||
}
|
||||
|
||||
if ( is_user_admin() )
|
||||
$scheme = 'logged_in';
|
||||
else
|
||||
$scheme = apply_filters( 'auth_redirect_scheme', '' );
|
||||
/**
|
||||
* Filters the authentication redirect scheme.
|
||||
*
|
||||
* @since 2.9.0
|
||||
*
|
||||
* @param string $scheme Authentication redirect scheme. Default empty.
|
||||
*/
|
||||
$scheme = apply_filters( 'auth_redirect_scheme', '' );
|
||||
|
||||
if ( $user_id = wp_validate_auth_cookie( '', $scheme) ) {
|
||||
do_action('auth_redirect', $user_id);
|
||||
|
|
Loading…
Reference in New Issue