rest_after_insert_application_password action-hookWP 5.6.0

Fires after a single application password is completely created or updated via the REST API.

Usage

add_action( 'rest_after_insert_application_password', 'wp_kama_rest_after_insert_application_password_action', 10, 3 );

/**
 * Function for `rest_after_insert_application_password` action-hook.
 * 
 * @param array           $item     Inserted or updated password item.
 * @param WP_REST_Request $request  Request object.
 * @param bool            $creating True when creating an application password, false when updating.
 *
 * @return void
 */
function wp_kama_rest_after_insert_application_password_action( $item, $request, $creating ){

	// action...
}
$item(array)
Inserted or updated password item.
$request(WP_REST_Request)
Request object.
$creating(true|false)
True when creating an application password, false when updating.

Changelog

Since 5.6.0 Introduced.

Where the hook is called

WP_REST_Application_Passwords_Controller::create_item()
rest_after_insert_application_password
WP_REST_Application_Passwords_Controller::update_item()
rest_after_insert_application_password
wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php 273
do_action( 'rest_after_insert_application_password', $item, $request, true );
wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php 352
do_action( 'rest_after_insert_application_password', $item, $request, false );

Where the hook is used in WordPress

Usage not found.