rest_after_insert_application_password
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
rest_after_insert_application_password
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 );