Tribe_Meta_Box::delete_attachments( $post_id )
Source
File: lib/tribe-meta-box.php
public function delete_attachments( $post_id ) { $attachments = get_posts( array( 'numberposts' => -1, 'post_type' => 'attachment', 'post_parent' => $post_id, ) ); if ( ! empty( $attachments ) ) { foreach ( $attachments as $att ) { wp_delete_attachment( $att->ID ); } } }