Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: registration_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.

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
454           $user_email = $_POST['user_email'];
455           $errors = register_new_user($user_login, $user_email);
456           if ( !is_wp_error($errors) ) {
457                $redirect_to = !empty( $_POST['redirect_to'] ) ? $_POST['redirect_to'] : 'wp-login.php?checkemail=registered';
458                wp_safe_redirect( $redirect_to );
459                exit();
460           }
461      }
462
463      $redirect_to = apply_filters( 'registration_redirect', !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '' );
464      login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors);
465 ?>
466
467 <form name="registerform" id="registerform" action="<?php echo site_url('wp-login.php?action=register', 'login_post') ?>" method="post">
468      <p>
469           <label><?php _e('Username') ?><br />
470           <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(stripslashes($user_login)); ?>" size="20" tabindex="10" /></label>
471      </p>
472      <p>