WordPress at a glance
action is not described

wp_media_attach_action action-hook . WP 5.5.0

Fires when media is attached or detached from a post.

Usage

add_action( 'wp_media_attach_action', 'action_function_name_8651', 10, 3 );
function action_function_name_8651( $action, $attachment_id, $parent_id ){
	// action...
}
$action(string)
Attach/detach action. Accepts 'attach' or 'detach'.
$attachment_id(int)
The attachment ID.
$parent_id(int)
Attachment parent ID.

Changelog

Since 5.5.0 Introduced.

Where the hook is called

wp_media_attach_action()
wp_media_attach_action
wp-admin/includes/media.php 3804
do_action( 'wp_media_attach_action', $action, $attachment_id, $parent_id );

Where in WP core the hook is used WordPress

Usage not found.