A WordPress-centric search engine for devs and theme authors



delete_attachment ›

Since2.0.0
Deprecatedn/a
do_action( 'delete_attachment', $post_id )
Parameters:
  • (int) $post_id Attachment ID.
    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 );