wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_media_attach_action › WordPress Action Hooks

Since5.5.0
Deprecatedn/a
do_action( 'wp_media_attach_action', $action, $attachment_id, $parent_id )
Parameters: (3)
  • () action Attach/detach action. Accepts 'attach' or 'detach'.
    Required: Yes
  • () attachment_id The attachment ID.
    Required: Yes
  • () parent_id Attachment parent ID.
    Required: Yes
Defined at:
Codex:

Fires when media is attached or detached from a post.





Source

do_action( 'wp_media_attach_action', $action, $attachment_id, $parent_id );