Opened 7 months ago
Closed 4 weeks ago
#22140 closed enhancement (fixed)
fetch_feed parameter is documented incorrectly
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.6 |
| Component: | Inline Docs | Version: | 2.8 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | td@… |
Description
The fetch_feed function in wp-includes/feed.php is documented to allow one parameter of type string. fetch_feed passes that parameter to the set_feed_url method of a newly created SimplePie object. However, set_feed_url can accept a URL string or an array of URL's. Therefore, fetch_feed should be documented as having one parameter of mixed type (string OR array).
Attachments (4)
Change History (21)
- Summary changed from fetch_feed parameter is misdocumented to fetch_feed parameter is documented incorrectly
comment:4
SergeyBiryukov — 6 months ago
- Version changed from trunk to 2.8
JustinSainton — 3 months ago
comment:6
JustinSainton — 3 months ago
Thinking URLs doesn't need the apostrophe here?
comment:7
follow-up:
↓ 8
SergeyBiryukov — 2 months ago
Not sure if we should advertise that $url can be an array here. See http://simplepie.org/wiki/faq/typical_multifeed_gotchas.
Replying to SergeyBiryukov:
Not sure if we should advertise that $url can be an array here. See http://simplepie.org/wiki/faq/typical_multifeed_gotchas.
I'd be inclined to agree as well.
comment:9
SergeyBiryukov — 2 months ago
- Milestone 3.6 deleted
- Resolution set to wontfix
- Status changed from new to closed
comment:10
rmccue — 2 months ago
-1 on wontfix. Multifeeds are used so popularly that they're basically the main way to use SimplePie.
The only real gotchas with using them are that the feed-level accessors don't make sense, since you're operating on a group rather than on a single feed. For the next version of SimplePie, I'm working on making this clearer to users, but it's fairly obvious when you try and use them anyway.
comment:11
follow-up:
↓ 14
nacin — 7 weeks ago
Okay, but let's tweak it a bit. Maybe something like:
@param mixed $url URL of feed to retrieve. If an array of URLs, the feeds are merged using SimplePie's multifeed feature. See also {@link http://simplepie.org/wiki/faq/typical_multifeed_gotchas}.
The "see also" is optional.
JustinSainton — 7 weeks ago
comment:12
JustinSainton — 7 weeks ago
Refreshed with nacin's suggestions.
comment:13
ocean90 — 7 weeks ago
- Milestone set to 3.6
- Resolution wontfix deleted
- Status changed from closed to reopened
comment:14
in reply to:
↑ 11
rmccue — 6 weeks ago
Replying to nacin:
Okay, but let's tweak it a bit. Maybe something like:
@param mixed $url URL of feed to retrieve. If an array of URLs, the feeds are merged using SimplePie's multifeed feature. See also {@link http://simplepie.org/wiki/faq/typical_multifeed_gotchas}.
The "see also" is optional.
Sounds good.
Patch looks OK, but $url is used in the documentation, whereas $urls is used in the prototype. The see also has to also be on the same line (from memory).
JustinSainton — 6 weeks ago
comment:15
JustinSainton — 6 weeks ago
- Keywords dev-feedback added
comment:16
SergeyBiryukov — 5 weeks ago
- Keywords commit added; dev-feedback removed
comment:17
nacin — 4 weeks ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from reopened to closed
In 24054:

A patch that updates the documentation for the fetch_feed method as well as renames the parameter.