do_action( 'wp_create_application_password', int $user_id, array $new_item, string $new_password, array $args )
- Since
- 5.6.0, 6.8.0
Fires when an application password is created.
Compatibility
- WordPress
- since 6.8.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$user_idint- The user ID.
$new_itemarray- { The details about the created password.
@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 null $last_used Null.
@type null $last_ip Null.
}$uuidstringThe unique identifier for the application password.$app_idstringA UUID provided by the application to uniquely identify it.$namestringThe name of the application password.$passwordstringA one-way hash of the password.$createdintUnix timestamp of when the password was created.$last_usednullNull.$last_ipnullNull.
$new_passwordstring- The generated application password in plain text.
$argsarray- { Arguments used to create the application password.
@type string $name The name of the application password.
@type string $app_id A UUID provided by the application to uniquely identify it.
}$namestringThe name of the application password.$app_idstringA UUID provided by the application to uniquely identify it.
Where this hook fires · 1
wp-includes/class-wp-application-passwords.php:150WP_Application_Passwords::create_new_application_password()
Source code
* Arguments used to create the application password. * * @type string $name The name of the application password. * @type string $app_id A UUID provided by the application to uniquely identify it. * } */ do_action( 'wp_create_application_password', $user_id, $new_item, $new_password, $args ); return array( $new_password, $new_item ); } /** * Gets a user's application passwords.Changelog
Introduced in 5.6.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
6.8.0
The hashed password value now uses wp_fast_hash() instead of phpass.from the docblock
5.6.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 7.0.4 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.