Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#15016 closed enhancement (fixed)

Split wp_filter_object_list() in two

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

Description

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 16 years ago.
wp_list_filter.2.diff​ (2.8 KB ) - added by scribu 16 years ago.
Use in WP_Query
wp_list_filter.3.diff​ (2.8 KB ) - added by scribu 16 years ago.
Check $field before calling wp_list_pluck()

Download all attachments as: .zip

Change History (4)

@scribu
16 years ago

Check $field before calling wp_list_pluck()

#1 @scribu
16 years ago

  • Resolution → fixed
  • Status new → 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.