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 |
|---|---|
| 373 | |
| 374 | if ( $error ) { |
| 375 | /** |
| 376 | * Fires when an application password failed to authenticate the user. |
| 377 | * |
| 378 | * @since 5.6.0 |
| 379 | * |
| 380 | * @param WP_Error $error The authentication error. |
| 381 | */ |
| 382 | do_action( 'application_password_failed_authentication', $error ); |
| 383 | |
| 384 | return $error; |
| 385 | } |
| 386 | |
| 387 | /* |
| 388 | * Strip out anything non-alphanumeric. This is so passwords can be used with |
| 389 | * or without spaces to indicate the groupings for readability. |
| 390 | * |
| 391 | * Generated application passwords are exclusively alphanumeric. |
| Line | Code |
| 411 | * @param WP_Error $error The error object. |
| 412 | * @param WP_User $user The user authenticating. |
| 413 | * @param array $item The details about the application password. |
| 414 | * @param string $password The raw supplied password. |
| 415 | */ |
| 416 | do_action( 'wp_authenticate_application_password_errors', $error, $user, $item, $password ); |
| 417 | |
| 418 | if ( is_wp_error( $error ) && $error->has_errors() ) { |
| 419 | /** This action is documented in wp-includes/user.php */ |
| 420 | do_action( 'application_password_failed_authentication', $error ); |
| 421 | |
| 422 | return $error; |
| 423 | } |
| 424 | |
| 425 | WP_Application_Passwords::record_application_password_usage( $user->ID, $item['uuid'] ); |
| 426 | |
| 427 | /** |
| 428 | * Fires after an application password was used for authentication. |
| 429 | * |
| Line | Code |
| 437 | return $user; |
| 438 | } |
| 439 | |
| 440 | $error = new WP_Error( |
| 441 | 'incorrect_password', |
| 442 | __( 'The provided password is an invalid application password.' ) |
| 443 | ); |
| 444 | |
| 445 | /** This action is documented in wp-includes/user.php */ |
| 446 | do_action( 'application_password_failed_authentication', $error ); |
| 447 | |
| 448 | return $error; |
| 449 | } |
| 450 | |
| 451 | /** |
| 452 | * Validates the application password credentials passed via Basic Authentication. |
| 453 | * |
| 454 | * @since 5.6.0 |
| 455 | * |