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 |
---|---|
169 | if ( empty( $user->user_email ) ) { |
170 | $errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please enter an e-mail address.' ), array( 'form-field' => 'email' ) ); |
171 | } elseif ( !is_email( $user->user_email ) ) { |
172 | $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The e-mail address isn’t correct.' ), array( 'form-field' => 'email' ) ); |
173 | } elseif ( ( $owner_id = email_exists($user->user_email) ) && ( !$update || ( $owner_id != $user->ID ) ) ) { |
174 | $errors->add( 'email_exists', __('<strong>ERROR</strong>: This email is already registered, please choose another one.'), array( 'form-field' => 'email' ) ); |
175 | } |
176 |
|
177 | // Allow plugins to return their own errors. |
178 | do_action_ref_array('user_profile_update_errors', array ( &$errors, $update, &$user ) ); |
179 |
|
180 | if ( $errors->get_error_codes() ) |
181 | return $errors; |
182 |
|
183 | if ( $update ) { |
184 | $user_id = wp_update_user( get_object_vars( $user ) ); |
185 | } else { |
186 | $user_id = wp_insert_user( get_object_vars( $user ) ); |
187 | wp_new_user_notification( $user_id, isset($_POST['send_password']) ? $pass1 : '' ); |