WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #30691, comment 3


Ignore:
Timestamp:
12/12/2014 02:07:07 PM (7 years ago)
Author:
juggledad
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30691, comment 3

    initial v1  
    22
    33Then this seems like a bug in those two functions. If the featured image is removed from a post and I use get_children(), it should not return that featured image since it is no longer associated with the post.
     4
     5UPDATE: So i just tested adding a new image via media, then added a post and set the featured image to the new image I uploaded and in fact, the post_parent is set to '0' not the post's ID.
     6
     7And when I remove the featured image, the featured image does not show and is not returned using the get_children() function.
     8
     9So this begs the question, if an featured image is added while editing the post and subsequently removed, is the image still a child of the post? if so there are two different cases for posts and featured images...confusing....