#18092 closed defect (bug) (fixed)
wp_list_filter() OR operator doesn't work
| Reported by: | kevinB | Owned by: | dd32 |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.3 |
| Component: | General | Version: | 3.2 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
wp_list_filter() always returns all elements when the OR operator is passed. This affects corresponding usage of get_post_types(), get_taxonomies(), get_post_stati().
The following call should return only private and public stati, but actually returns all:
$all_stati = get_post_stati( array( 'private' => true, 'public' => true ), 'names', 'OR' );
Attachments (1)
Change History (5)
#2
@
15 years ago
Altered some test cases to catch this: http://unit-tests.trac.wordpress.org/changeset/437
Patch as-is seems fine based on the test cases, I'll give it a run in the wild on core's usage of it tomorrow.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
wp_list_filter() : OR operator was broken