Action hook 'rest_after_insert_application_password'

in WP Core File wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php at line 352

View Source

rest_after_insert_application_password

Action Hook
Description
Updates an application password.

Hook Information

File Location wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php View on GitHub
Hook Type Action
Line Number 352

Hook Parameters

Type Name Description
WP_REST_Request $request Full details about the request.

Usage Examples

Basic Usage
<?php
// Hook into rest_after_insert_application_password
add_action('rest_after_insert_application_password', 'my_custom_function', 10, 1);

function my_custom_function($request) {
    // Your custom code here
}

Source Code Context

wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php:352 - How this hook is used in WordPress core
<?php
 347  		}
 348  
 349  		$item = WP_Application_Passwords::get_user_application_password( $user->ID, $item['uuid'] );
 350  
 351  		/** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php */
 352  		do_action( 'rest_after_insert_application_password', $item, $request, false );
 353  
 354  		$request->set_param( 'context', 'edit' );
 355  		return $this->prepare_item_for_response( $item, $request );
 356  	}
 357  

PHP Documentation

<?php
/**
	 * Updates an application password.
	 *
	 * @since 5.6.0
	 *
	 * @param WP_REST_Request $request Full details about the request.
	 * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
	 */
Quick Info
  • Hook Type: Action
  • Parameters: 1
  • File: wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php
Related Hooks

Related hooks will be displayed here in future updates.