[wp-trac] [WordPress Trac] #39049: get_pages() docs say function returns list, actually returns array

WordPress Trac noreply at wordpress.org
Sun Dec 4 17:33:17 UTC 2016


#39049: get_pages() docs say function returns list, actually returns array
-------------------------------+------------------------------
 Reporter:  ovenall            |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  has-patch close    |     Focuses:  docs
-------------------------------+------------------------------
Changes (by swissspidy):

 * keywords:  has-patch => has-patch close
 * version:  trunk =>


Comment:

 Hey there,

 Thanks for opening this ticket and welcome to WordPress Trac!

 The terms array and list are often used interchangeably in documentation
 throughout WordPress core. In fact, searching for "a list of" in core
 returns almost 150 results. The return type clearly says `array` and
 there's no List interface like in Java or many other programming languages
 that this could be mixed up with. Thus, I do not think that there's much
 confusion. If it turns out to be very confusing for developers, this
 should be applied to all relevant sections and not just `get_pages()`

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


More information about the wp-trac mailing list