WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #47868


Ignore:
Timestamp:
08/13/2019 01:31:21 PM (13 months ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #47868

    • Property Component changed from General to Media
  • Ticket #47868 – Description

    initial v1  
    77
    88I'm calling
    9 
     9{{{
    1010 $attachments = get_attached_media('', $post->ID);
    1111 foreach ($attachments as $attachment) {
    1212    wp_delete_attachment($attachment->ID, true);
    1313wp_delete_attachment never returns falsy.
    14 
     14}}}
    1515How can I figure out and fix wp_delete_attachment ?
    1616