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



delete_attachment › WordPress Action Hooks

Since5.5.0
Deprecatedn/a
do_action( 'delete_attachment', $post_id, $post )
Parameters: (2)
  • () post_id Attachment ID.
    Required: Yes
  • () post Post object.
    Required: Yes
Defined at:
Codex:

Fires before an attachment is deleted, at the start of wp_delete_attachment().





Source

do_action( 'delete_attachment', $post_id, $post );