[wp-trac] [WordPress Trac] #31316: wp_list_pluck unexpectedly returns id indexed array instead of plucked values with index_key = null

WordPress Trac noreply at wordpress.org
Fri Feb 13 16:51:58 UTC 2015


#31316: wp_list_pluck unexpectedly returns id indexed array instead of plucked
values with index_key = null
-----------------------------+---------------------------
 Reporter:  adamsilverstein  |       Owner:  boonebgorges
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:  4.2
Component:  General          |     Version:  3.1
 Severity:  normal           |  Resolution:  fixed
 Keywords:  has-patch        |     Focuses:  docs
-----------------------------+---------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"31451"]:
 {{{
 #!CommitTicketReference repository="" revision="31451"
 Improve documentation for return value of `wp_list_pluck()`.

 `wp_list_pluck()` will preserve the original array keys if no `$index_key`
 parameter is provided. This changeset updates the documentation
 accordingly.

 Props adamsilverstein.
 Fixes #31316.
 }}}

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


More information about the wp-trac mailing list