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 | 
|---|---|
| 209 |      if ( FALSE == get_option('users_can_register') ) { | 
| 210 |           wp_redirect('wp-login.php?registration=disabled'); | 
| 211 |           exit(); | 
| 212 |      } | 
| 213 |  | 
| 214 |      if ( $_POST ) { | 
| 215 |           require_once( ABSPATH . WPINC . '/registration.php'); | 
| 216 |  | 
| 217 |           $user_login = sanitize_user( $_POST['user_login'] ); | 
| 218 |           $user_email = apply_filters( 'user_registration_email', $_POST['user_email'] );  | 
| 219 |  | 
| 220 |           // Check the username | 
| 221 |           if ( $user_login == '' ) | 
| 222 |                $errors['user_login'] = __('<strong>ERROR</strong>: Please enter a username.'); | 
| 223 |           elseif ( !validate_username( $user_login ) ) { | 
| 224 |                $errors['user_login'] = __('<strong>ERROR</strong>: This username is invalid.  Please enter a valid username.'); | 
| 225 |                $user_login = ''; | 
| 226 |           } elseif ( username_exists( $user_login ) ) | 
| 227 |                $errors['user_login'] = __('<strong>ERROR</strong>: This username is already registered, please choose another one.'); |