WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )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.
| Line | Code |
|---|---|
| 549 | $user_email = $_POST['user_email']; |
| 550 | $errors = register_new_user($user_login, $user_email); |
| 551 | if ( !is_wp_error($errors) ) { |
| 552 | $redirect_to = !empty( $_POST['redirect_to'] ) ? $_POST['redirect_to'] : 'wp-login.php?checkemail=registered'; |
| 553 | wp_safe_redirect( $redirect_to ); |
| 554 | exit(); |
| 555 | } |
| 556 | } |
| 557 | |
| 558 | $redirect_to = apply_filters( 'registration_redirect', !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '' ); |
| 559 | login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors); |
| 560 | ?> |
| 561 | |
| 562 | <form name="registerform" id="registerform" action="<?php echo esc_url( site_url('wp-login.php?action=register', 'login_post') ); ?>" method="post"> |
| 563 | <p> |
| 564 | <label for="user_login"><?php _e('Username') ?><br /> |
| 565 | <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(wp_unslash($user_login)); ?>" size="20" /></label> |
| 566 | </p> |
| 567 | <p> |