Description: Admin: Allow for the consistent filtering of auth_redirect_scheme
Author: jeremyfelt
Origin: upstream, https://core.trac.wordpress.org/changeset/37762/
Applied-Upstream: 4.1.12
Reviewed-by: Craig Small <csmall@debian.org>
Last-Update: 2016-06-26
--- a/wp-includes/pluggable.php
+++ b/wp-includes/pluggable.php
@@ -1007,18 +1007,14 @@
 		}
 	}
 
-	if ( is_user_admin() ) {
-		$scheme = 'logged_in';
-	} else {
-		/**
-		 * Filter the authentication redirect scheme.
-		 *
-		 * @since 2.9.0
-		 *
-		 * @param string $scheme Authentication redirect scheme. Default empty.
-		 */
-		$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) ) {
 		/**
