WordPress at Your Fingertips
action is not described

rest_insert_attachment action-hook . WP 4.7.0

Fires after a single attachment is created or updated via the REST API.


add_action( 'rest_insert_attachment', 'action_function_name_7072', 10, 3 );
function action_function_name_7072( $attachment, $request, $creating ){
	// action...
Inserted or updated attachment object.
The request sent to the API.
True when creating an attachment, false when updating.

Where the hook is called

wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php 299
do_action( 'rest_insert_attachment', $attachment, $request, true );

Where in WP core the hook is used WordPress

Usage not found.