#17673 closed defect (bug) (fixed)
get_adjacent_post() uses ' and ' as undocumented separator for excluded categories
Reported by: | kawauso | Owned by: | ryan |
---|---|---|---|
Milestone: | 3.3 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Template | Keywords: | has-patch commit 3.3-early |
Focuses: | Cc: |
Description
get_adjacent_post()
(and all derivative functions) use a non-standard and undocumented separator for IDs passed for $excluded_categories
and have no support for either commas or an array.
Attachments (3)
Change History (18)
#2
in reply to:
↑ 1
@
13 years ago
- Milestone changed from 3.2 to Future Release
- Version changed from 3.2 to 3.1
#3
@
13 years ago
- Keywords has-patch added
Patch changes $excluded_categories
to a comma-separated list, consistent with get_boundary_post()
, get_posts()
and related functions. Also makes this clear in the inline docs.
#5
@
13 years ago
dare I say we should attempt to introduce array||comma separated
notation whenever changes like this area made?
(But yes, this is a 3.3 thing)
#6
@
13 years ago
Second patch accepts arrays as well. While writing this I noticed that there was a bug in get_boundary_post()
- $excluded_categories
was being reset to an empty array so it would never exclude anything. Seems nobody uses that feature, otherwise they would have noticed..
#7
@
13 years ago
I'd change that check to if ( !is_array($excluded_categories) )
for 2 reasons, is_string() will return false for ints, and, it's best to check to see if something is not in the expected form and process (in turn, casting to string magically by php) parsing the inputs.
#9
@
13 years ago
- Keywords 3.3-early added
Everyone's favourite bug is coming up for its 7th birthday!
#12
@
13 years ago
- Owner set to ryan
- Resolution set to fixed
- Status changed from new to closed
In [18477]:
That's one of the weirder things I've seen. Let's fix this.