wp_update_application_password
Action HookDescription
Fires when an application password is updated. Existing passwords may still be hashed using phpass. }Hook Information
File Location |
wp-includes/class-wp-application-passwords.php
View on GitHub
|
Hook Type | Action |
Line Number | 319 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$user_id
|
The user ID. |
array
|
$item
|
{ The updated application password details. |
array
|
$update
|
The information to update. |
Usage Examples
Basic Usage
<?php
// Hook into wp_update_application_password
add_action('wp_update_application_password', 'my_custom_function', 10, 3);
function my_custom_function($user_id, $item, $update) {
// Your custom code here
}
Source Code Context
wp-includes/class-wp-application-passwords.php:319
- How this hook is used in WordPress core
<?php
314 * @type int|null $last_used The Unix timestamp of the GMT date the application password was last used.
315 * @type string|null $last_ip The IP address the application password was last used by.
316 * }
317 * @param array $update The information to update.
318 */
319 do_action( 'wp_update_application_password', $user_id, $item, $update );
320
321 return true;
322 }
323
324 return new WP_Error( 'application_password_not_found', __( 'Could not find an application password with that id.' ) );
PHP Documentation
<?php
/**
* Fires when an application password is updated.
*
* @since 5.6.0
* @since 6.8.0 The password is now hashed using wp_fast_hash() instead of phpass.
* Existing passwords may still be hashed using phpass.
*
* @param int $user_id The user ID.
* @param array $item {
* The updated application password details.
*
* @type string $uuid The unique identifier for the application password.
* @type string $app_id A UUID provided by the application to uniquely identify it.
* @type string $name The name of the application password.
* @type string $password A one-way hash of the password.
* @type int $created Unix timestamp of when the password was created.
* @type int|null $last_used The Unix timestamp of the GMT date the application password was last used.
* @type string|null $last_ip The IP address the application password was last used by.
* }
* @param array $update The information to update.
*/
Quick Info
- Hook Type: Action
- Parameters: 3
- File: wp-includes/class-wp-application-passwords.php
Related Hooks
Related hooks will be displayed here in future updates.