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 |
---|---|
228 | $errors['user_email'] = __('<strong>ERROR</strong>: Please type your e-mail address.'); |
229 | } elseif ( !is_email( $user_email ) ) { |
230 | $errors['user_email'] = __('<strong>ERROR</strong>: The email address isn’t correct.'); |
231 | $user_email = ''; |
232 | } elseif ( email_exists( $user_email ) ) |
233 | $errors['user_email'] = __('<strong>ERROR</strong>: This email is already registered, please choose another one.'); |
234 |
|
235 | do_action('register_post'); |
236 |
|
237 | $errors = apply_filters( 'registration_errors', $errors ); |
238 |
|
239 | if ( empty( $errors ) ) { |
240 | $user_pass = substr( md5( uniqid( microtime() ) ), 0, 7); |
241 |
|
242 | $user_id = wp_create_user( $user_login, $user_pass, $user_email ); |
243 | if ( !$user_id ) |
244 | $errors['registerfail'] = sprintf(__('<strong>ERROR</strong>: Couldn’t register you... please contact the <a href="mailto:%s">webmaster</a> !'), get_option('admin_email')); |
245 | else { |
246 | wp_new_user_notification($user_id, $user_pass); |