[wp-trac] [WordPress Trac] #18230: Optimize wp_list_pluck

WordPress Trac wp-trac at lists.automattic.com
Tue Aug 2 19:06:01 UTC 2011


#18230: Optimize wp_list_pluck
-------------------------+------------------
 Reporter:  Otto42       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  3.3
Component:  Performance  |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------

Comment (by nacin):

 A note, property_exists() (the equivalent for array_key_exists) doesn't
 verify magic `__get()` properties, so I would stick to is_object().

 Perhaps we could cache is_object() (pull it outside the loop, etc.) and
 assume wp_list_pluck() will be operating on only objects or only arrays at
 any given time.

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


More information about the wp-trac mailing list