wp_media_attach_action
wp_media_attach_action ( $parent_id, $action = 'attach' )
Parameters:- (int) parent_id Attachment parent ID.
- (string) action Optional. Attach/detach action. Accepts 'attach' or 'detach'. Default 'attach'.
Defined at: - Introduced in WordPress: 4.2.0
- Deprecated in WordPress: —
Description
Encapsulates the logic for Attach/Detach actions.