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