[wp-trac] [WordPress Trac] #10511: Enclosure Custom Fields are automatically deleted

WordPress Trac noreply at wordpress.org
Fri Jan 9 13:51:30 UTC 2015

#10511: Enclosure Custom Fields are automatically deleted
 Reporter:  animepulse                      |       Owner:
     Type:  defect (bug)                    |      Status:  reopened
 Priority:  high                            |   Milestone:  Future Release
Component:  Feeds                           |     Version:  2.8
 Severity:  major                           |  Resolution:
 Keywords:  has-patch needs-nacin-feedback  |     Focuses:

Comment (by hlashbrooke):

 There's obviously still no movement here, but I've found a way that seems
 to work with regards to working around this issue. If you delete the meta
 field called `_encloseme` from the post then `do_enclose()` won't run and
 the enclosure field won't be deleted. It took quite a bit of searching
 through core to find this, but a simple solution is to run
 `delete_post_meta( $post_id, '_encloseme' );` as early as possible on the
 `save_post` hook for any post where you would like to keep the `enclosure`
 custom field.

 That might not be the cleanest solution, but it looks like it works
 consistently for me until this is sorted out in core.

Ticket URL: <https://core.trac.wordpress.org/ticket/10511#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list