wp_create_application_password action-hookWP 5.6.0

Fires when an application password is created.

Usage

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 unhashed generated application password.
 * @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(array)

The details about the created password.

  • uuid(string)
    The unique identifier for the application password.

  • app_id(string)
    A UUID provided by the application to uniquely identify it.

  • name(string)
    The name of the application password.

  • password(string)
    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(string)
The unhashed generated application password.
$args(array)

Arguments used to create the application password.

  • name(string)
    The name of the application password.

  • app_id(string)
    A UUID provided by the application to uniquely identify it.

Changelog

Since 5.6.0 Introduced.

Where the hook is called

WP_Application_Passwords::create_new_application_password()
wp_create_application_password
wp-includes/class-wp-application-passwords.php 137
do_action( 'wp_create_application_password', $user_id, $new_item, $new_password, $args );

Where the hook is used in WordPress

Usage not found.