[wp-trac] [WordPress Trac] #37128: Introduce helper function `wp_list_sort()`

WordPress Trac noreply at wordpress.org
Sun Jun 19 16:24:31 UTC 2016


#37128: Introduce helper function `wp_list_sort()`
-------------------------+-----------------------------
 Reporter:  flixos90     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:
 Severity:  normal       |   Keywords:  needs-patch
  Focuses:               |
-------------------------+-----------------------------
 When dealing with object lists in WordPress, we have easy-to-use utility
 functions available for filtering (`wp_list_filter()`) and plucking a
 field (`wp_list_pluck()`). What we don't have however, is a function to
 easily sort the list by a specific field.

 Although a function like this wouldn't need to be used inside of WordPress
 Core, it would certainly make it easier for plugin developers by being
 provided such a function. Therefore I think we should add it.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37128>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list