wp_create_application_password
Fires when an application password is created.
Использование
add_action( 'wp_create_application_password', 'wp_kama_create_application_password_action', 10, 4 );
/**
* Function for `wp_create_application_password` action-hook.
*
* @param int $user_id The user ID.
* @param array $new_item The details about the created password.
* @param string $new_password The generated application password in plain text.
* @param array $args Arguments used to create the application password.
*
* @return void
*/
function wp_kama_create_application_password_action( $user_id, $new_item, $new_password, $args ){
// action...
}
- $user_id(int)
- The user ID.
- $new_item(массив)
The details about the created password.
-
uuid(строка)
The unique identifier for the application password. -
app_id(строка)
A UUID provided by the application to uniquely identify it. -
name(строка)
The name of the application password. -
password(строка)
A one-way hash of the password. -
created(int)
Unix timestamp of when the password was created. -
last_used(null)
Null. - last_ip(null)
Null.
-
- $new_password(строка)
- The generated application password in plain text.
- $args(массив)
Arguments used to create the application password.
-
name(строка)
The name of the application password. - app_id(строка)
A UUID provided by the application to uniquely identify it.
-
Список изменений
| С версии 5.6.0 | Введена. |
| С версии 6.8.0 | The hashed password value now uses wp_fast_hash() instead of phpass. |
Где вызывается хук
wp_create_application_password
wp-includes/class-wp-application-passwords.php 150
do_action( 'wp_create_application_password', $user_id, $new_item, $new_password, $args );