Welcome, visitor! Log in
 

Source View: login_redirect

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: apply_filters( "hook_name", "what_to_filter" ).

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
593
594      // If the user was redirected to a secure login form from a non-secure admin page, and secure login is required but secure admin is not, then don't use a secure
595      // cookie and redirect back to the referring non-secure admin page. This allows logins to always be POSTed over SSL while allowing the user to choose visiting
596      // the admin via http or https.
597      if ( !$secure_cookie && is_ssl() && force_ssl_login() && !force_ssl_admin() && ( 0 !== strpos($redirect_to, 'https') ) && ( 0 === strpos($redirect_to, 'http') ) )
598           $secure_cookie = false;
599
600      $user = wp_signon('', $secure_cookie);
601
602      $redirect_to = apply_filters('login_redirect', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '', $user);
603
604      if ( !is_wp_error($user) && !$reauth ) {
605           if ( $interim_login ) {
606                $message = '<p class="message">' . __('You have logged in successfully.') . '</p>';
607                login_header( '', $message );
608
609                if ( ! $customize_login ) : ?>
610                     <script type="text/javascript">setTimeout( function(){window.close()}, 8000);</script>
611                     <p class="alignright">