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.
This hook occurs 2 times in this file.
Line | Code |
---|---|
163 | /** |
164 | * Filters whether the given user can be authenticated with the provided $password. |
165 | * |
166 | * @since 2.5.0 |
167 | * |
168 | * @param WP_User|WP_Error $user WP_User or WP_Error object if a previous |
169 | * callback failed authentication. |
170 | * @param string $password Password to check against the user. |
171 | */ |
172 | $user = apply_filters( 'wp_authenticate_user', $user, $password ); |
173 | if ( is_wp_error( $user ) ) { |
174 | return $user; |
175 | } |
176 |
|
177 | if ( ! wp_check_password( $password, $user->user_pass, $user->ID ) ) { |
178 | return new WP_Error( |
179 | 'incorrect_password', |
180 | sprintf( |
181 | /* translators: %s: user name */ |
Line | Code |
236 | 'invalid_email', |
237 | __( '<strong>ERROR</strong>: Invalid email address.' ) . |
238 | ' <a href="' . wp_lostpassword_url() . '">' . |
239 | __( 'Lost your password?' ) . |
240 | '</a>' |
241 | ); |
242 | } |
243 |
|
244 | /** This filter is documented in wp-includes/user.php */ |
245 | $user = apply_filters( 'wp_authenticate_user', $user, $password ); |
246 |
|
247 | if ( is_wp_error( $user ) ) { |
248 | return $user; |
249 | } |
250 |
|
251 | if ( ! wp_check_password( $password, $user->user_pass, $user->ID ) ) { |
252 | return new WP_Error( |
253 | 'incorrect_password', |
254 | sprintf( |