Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#15016 closed enhancement (fixed)

Split wp_filter_object_list() in two

Reported by: scribu's profile scribu Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:


The wp_filter_object_list() is actually two distinct operations merged into one.

It would be better if each operation was split into it's own utility function:

wp_list_filter() - filter a list of objects

wp_list_pluck() - pluck a field out of each object in a list

Attachments (3)

wp_list_filter.diff (2.2 KB) - added by scribu 14 years ago.
wp_list_filter.2.diff (2.8 KB) - added by scribu 14 years ago.
Use in WP_Query
wp_list_filter.3.diff (2.8 KB) - added by scribu 14 years ago.
Check $field before calling wp_list_pluck()

Download all attachments as: .zip

Change History (4)

14 years ago

Use in WP_Query

14 years ago

Check $field before calling wp_list_pluck()

#1 @scribu
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [15686]) Split wp_filter_object_list() into wp_list_filter() and wp_list_pluck(). Fixes #15016

Note: See TracTickets for help on using tickets.