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
820      /**
821       * Filter the login redirect URL.
822       *
823       * @since 3.0.0
824       *
825       * @param string           $redirect_to           The redirect destination URL.
826       * @param string           $requested_redirect_to The requested redirect destination URL passed as a parameter.
827       * @param WP_User|WP_Error $user                  WP_User object if login was successful, WP_Error object otherwise.
828       */
829      $redirect_to = apply_filters( 'login_redirect', $redirect_to, $requested_redirect_to, $user );
830
831      if ( !is_wp_error($user) && !$reauth ) {
832           if ( $interim_login ) {
833                $message = '<p class="message">' . __('You have logged in successfully.') . '</p>';
834                $interim_login = 'success';
835                login_header( '', $message ); ?>
836                </div>
837                <?php
838                /** This action is documented in wp-login.php */