[wp-trac] [WordPress Trac] #30691: Removing a featured image does not remove the 'post_parent' value - reproducible

WordPress Trac noreply at wordpress.org
Fri Dec 12 16:57:45 UTC 2014


#30691: Removing a featured image does not remove the 'post_parent' value -
reproducible
--------------------------+------------------------------
 Reporter:  juggledad     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  4.0.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by juggledad):

 @knutsp - The main question is this: should get_children() and get_posts()
 return a link to a attachment when the attachment is no longer the
 featured image or an attachment in the post?

 @SergeyBiryukov - from the codex 'get_children() retrieves attachments,
 revisions, or sub-pages, possibly by post parent.'
 if the featured image is removed from a post, then isn't it is no longer
 an attachment? - yet it is returned as an attachment to the post.

 Something is not consistent. If the image exists and I set it as a
 featured image then remove it, it is not returned by get_children(). If I
 upload an image as the featured image then remove it, it is returned by
 the get_children().

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30691#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list