[wp-trac] [WordPress Trac] #23708: get_post_ancestors() no longer works inside loop

WordPress Trac noreply at wordpress.org
Thu Mar 7 06:43:55 UTC 2013


#23708: get_post_ancestors() no longer works inside loop
-------------------------------+--------------------
 Reporter:  ripsup             |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  3.5.2
Component:  Post Types         |     Version:  3.5
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+--------------------
Changes (by nacin):

 * version:  3.5.1 => 3.5
 * milestone:  Awaiting Review => 3.5.2


Comment:

 This is legitimate.

 get_post_ancestors() used to call get_post() immediately, which would
 convert null/0 etc to the current $post global. Now, it bails.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23708#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list