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 3 times in this file.
Line | Code |
---|---|
385 |
|
386 | if ( $error ) { |
387 | /** |
388 | * Fires when an application password failed to authenticate the user. |
389 | * |
390 | * @since 5.6.0 |
391 | * |
392 | * @param WP_Error $error The authentication error. |
393 | */ |
394 | do_action( 'application_password_failed_authentication', $error ); |
395 |
|
396 | return $error; |
397 | } |
398 |
|
399 | /* |
400 | * Strips out anything non-alphanumeric. This is so passwords can be used with |
401 | * or without spaces to indicate the groupings for readability. |
402 | * |
403 | * Generated application passwords are exclusively alphanumeric. |
Line | Code |
423 | * @param WP_Error $error The error object. |
424 | * @param WP_User $user The user authenticating. |
425 | * @param array $item The details about the application password. |
426 | * @param string $password The raw supplied password. |
427 | */ |
428 | do_action( 'wp_authenticate_application_password_errors', $error, $user, $item, $password ); |
429 |
|
430 | if ( is_wp_error( $error ) && $error->has_errors() ) { |
431 | /** This action is documented in wp-includes/user.php */ |
432 | do_action( 'application_password_failed_authentication', $error ); |
433 |
|
434 | return $error; |
435 | } |
436 |
|
437 | WP_Application_Passwords::record_application_password_usage( $user->ID, $item['uuid'] ); |
438 |
|
439 | /** |
440 | * Fires after an application password was used for authentication. |
441 | * |
Line | Code |
449 | return $user; |
450 | } |
451 |
|
452 | $error = new WP_Error( |
453 | 'incorrect_password', |
454 | __( 'The provided password is an invalid application password.' ) |
455 | ); |
456 |
|
457 | /** This action is documented in wp-includes/user.php */ |
458 | do_action( 'application_password_failed_authentication', $error ); |
459 |
|
460 | return $error; |
461 | } |
462 |
|
463 | /** |
464 | * Validates the application password credentials passed via Basic Authentication. |
465 | * |
466 | * @since 5.6.0 |
467 | * |