/**
* Fires after a single application password is completely created or updated via the REST API.
*
* @since 5.6.0
*
* @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.
*/
do_action( 'rest_after_insert_application_password',
$item,
$request, true
);
$request->
set_param( 'context', 'edit'
);
$response =
$this->
prepare_item_for_response( $item,
$request );
$response->
set_status( 201
);
$response->
header( 'Location',
$response->
get_links()['self'
][0
]['href'
] );
return $response;
} /**
* Checks if a given request has access to update application passwords.
*
* @since 5.6.0
*
* @param WP_REST_Request $request Full details about the request.
* @return true|WP_Error True if the request has access to create items, WP_Error object otherwise.
*/