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 |
|---|---|
| 435 | |
| 436 | if ( $error ) { |
| 437 | /** |
| 438 | * Fires when an application password failed to authenticate the user. |
| 439 | * |
| 440 | * @since 5.6.0 |
| 441 | * |
| 442 | * @param WP_Error $error The authentication error. |
| 443 | */ |
| 444 | do_action( 'application_password_failed_authentication', $error ); |
| 445 | |
| 446 | return $error; |
| 447 | } |
| 448 | |
| 449 | /* |
| 450 | * Strips out anything non-alphanumeric. This is so passwords can be used with |
| 451 | * or without spaces to indicate the groupings for readability. |
| 452 | * |
| 453 | * Generated application passwords are exclusively alphanumeric. |
| Line | Code |
| 473 | * @param WP_Error $error The error object. |
| 474 | * @param WP_User $user The user authenticating. |
| 475 | * @param array $item The details about the application password. |
| 476 | * @param string $password The raw supplied password. |
| 477 | */ |
| 478 | do_action( 'wp_authenticate_application_password_errors', $error, $user, $item, $password ); |
| 479 | |
| 480 | if ( is_wp_error( $error ) && $error->has_errors() ) { |
| 481 | /** This action is documented in wp-includes/user.php */ |
| 482 | do_action( 'application_password_failed_authentication', $error ); |
| 483 | |
| 484 | return $error; |
| 485 | } |
| 486 | |
| 487 | WP_Application_Passwords::record_application_password_usage( $user->ID, $item['uuid'] ); |
| 488 | |
| 489 | /** |
| 490 | * Fires after an application password was used for authentication. |
| 491 | * |
| Line | Code |
| 499 | return $user; |
| 500 | } |
| 501 | |
| 502 | $error = new WP_Error( |
| 503 | 'incorrect_password', |
| 504 | __( 'The provided password is an invalid application password.' ) |
| 505 | ); |
| 506 | |
| 507 | /** This action is documented in wp-includes/user.php */ |
| 508 | do_action( 'application_password_failed_authentication', $error ); |
| 509 | |
| 510 | return $error; |
| 511 | } |
| 512 | |
| 513 | /** |
| 514 | * Validates the application password credentials passed via Basic Authentication. |
| 515 | * |
| 516 | * @since 5.6.0 |
| 517 | * |