Custom Fields
Support MB Custom Post Type How to force_delete files in custom uploads folder?

  • Creator
  • #15367

    It's a bit of an edge case.

    Specifically, with these settings for a custom post type:

                'type'             => 'file',
                'force_delete'     => true,
                'upload_dir' => WP_CONTENT_DIR . '/resources/',

    File deletes as expected when deleted from CPT edit screen, but if the containing post is binned and the bin emptied, the uploaded file remains. I can write a hook if you could suggest the best action/filter, but was wondering if there are any other parameters that can be passed to ensure the file is deleted?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.