From cc67b7a91c67c69c649c4c1684df65a91fe0a1fb Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 26 Aug 2008 17:57:29 +0000 Subject: [PATCH] Add login_redirect filter. fixes #7002 for 2.6 git-svn-id: http://svn.automattic.com/wordpress/branches/2.6@8737 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-login.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-login.php b/wp-login.php index e1fa23b526..265a223f98 100644 --- a/wp-login.php +++ b/wp-login.php @@ -424,6 +424,8 @@ default: $user = wp_signon('', $secure_cookie); + $redirect_to = apply_filters('login_redirect', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '', $user); + if ( !is_wp_error($user) ) { // If the user can't edit posts, send them to their profile. if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) )