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 |
|---|---|
| 403 | |
| 404 | if ( $error ) { |
| 405 | /** |
| 406 | * Fires when an application password failed to authenticate the user. |
| 407 | * |
| 408 | * @since 5.6.0 |
| 409 | * |
| 410 | * @param WP_Error $error The authentication error. |
| 411 | */ |
| 412 | do_action( 'application_password_failed_authentication', $error ); |
| 413 | |
| 414 | return $error; |
| 415 | } |
| 416 | |
| 417 | /* |
| 418 | * Strips out anything non-alphanumeric. This is so passwords can be used with |
| 419 | * or without spaces to indicate the groupings for readability. |
| 420 | * |
| 421 | * Generated application passwords are exclusively alphanumeric. |
| Line | Code |
| 441 | * @param WP_Error $error The error object. |
| 442 | * @param WP_User $user The user authenticating. |
| 443 | * @param array $item The details about the application password. |
| 444 | * @param string $password The raw supplied password. |
| 445 | */ |
| 446 | do_action( 'wp_authenticate_application_password_errors', $error, $user, $item, $password ); |
| 447 | |
| 448 | if ( is_wp_error( $error ) && $error->has_errors() ) { |
| 449 | /** This action is documented in wp-includes/user.php */ |
| 450 | do_action( 'application_password_failed_authentication', $error ); |
| 451 | |
| 452 | return $error; |
| 453 | } |
| 454 | |
| 455 | WP_Application_Passwords::record_application_password_usage( $user->ID, $item['uuid'] ); |
| 456 | |
| 457 | /** |
| 458 | * Fires after an application password was used for authentication. |
| 459 | * |
| Line | Code |
| 467 | return $user; |
| 468 | } |
| 469 | |
| 470 | $error = new WP_Error( |
| 471 | 'incorrect_password', |
| 472 | __( 'The provided password is an invalid application password.' ) |
| 473 | ); |
| 474 | |
| 475 | /** This action is documented in wp-includes/user.php */ |
| 476 | do_action( 'application_password_failed_authentication', $error ); |
| 477 | |
| 478 | return $error; |
| 479 | } |
| 480 | |
| 481 | /** |
| 482 | * Validates the application password credentials passed via Basic Authentication. |
| 483 | * |
| 484 | * @since 5.6.0 |
| 485 | * |