[wp-trac] Re: [WordPress Trac] #8348: get_posts behaviour altered

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 26 17:20:59 GMT 2008


#8348: get_posts behaviour altered
------------------------------------------+---------------------------------
 Reporter:  hailin                        |        Owner:  anonymous
     Type:  defect                        |       Status:  new      
 Priority:  normal                        |    Milestone:  2.7      
Component:  General                       |      Version:           
 Severity:  normal                        |   Resolution:           
 Keywords:  needs-patch needs-test-cases  |  
------------------------------------------+---------------------------------
Comment (by hailin):

 If there are no other cases which assumes, and whose behaviors rely on,
 the default post_parent=0 value, I think we can remove 'post_parent' => 0.

 Basically the logic should be:

 1. If the caller knows post_parent, caller should pass in an valid integer

 2. If the caller doesn't know post_parent, get_posts should honor caller's
 true intention, which is "I don't know whom my daddy is, it can be anyone
 in the world; could be 0 or any other value", thus should not assume it is
 0.

 After removing it, the wpmu plugin call works fine.

 I don't have other regression cases.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8348#comment:6>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list