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
601
602      // 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
603      // 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
604      // the admin via http or https.
605      if ( !$secure_cookie && is_ssl() && force_ssl_login() && !force_ssl_admin() && ( 0 !== strpos($redirect_to, 'https') ) && ( 0 === strpos($redirect_to, 'http') ) )
606           $secure_cookie = false;
607
608      $user = wp_signon('', $secure_cookie);
609
610      $redirect_to = apply_filters('login_redirect', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '', $user);
611
612      if ( !is_wp_error($user) && !$reauth ) {
613           if ( $interim_login ) {
614                $message = '<p class="message">' . __('You have logged in successfully.') . '</p>';
615                login_header( '', $message ); ?>
616
617                <?php if ( ! $customize_login ) : ?>
618                <script type="text/javascript">setTimeout( function(){window.close()}, 8000);</script>
619                <p class="alignright">