Opened 16 years ago
Closed 12 years ago
#10434 closed enhancement (fixed)
New filter request in feed.php
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | Feeds | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
When writing a plugin that works with the URLs in the RSS feeds, I noticed that one of the functions used by the RSS feed generator, "self_link" in wp-includes/feed.php does not have a filter associated with it. I had to manually modify the function in order to get the behaviour I desired.
The other functions used by the feed generator (the_permalink_rss, comments_link, the_guid, etc) all have filters associated with them either directly or indirectly and it would be nice for this one to have a filter placed on it as well.
Attachments (1)
Change History (7)
#1
@
16 years ago
- Milestone Unassigned deleted
- Resolution set to worksforme
- Status changed from new to closed
#2
@
12 years ago
- Cc josephscott added
- Keywords has-patch added
- Milestone set to Awaiting Review
- Resolution worksforme deleted
- Status changed from closed to reopened
- Version set to trunk
The self_link() function is used in feed-atom.php, feed-rss2-comments.php, feed-rss2.php for the self item in the feed. What I'm seeing with the PuSHPress plugin (for PubSubHubbub) is that the inclusion of $_SERVER['REQUEST_URI']
is triggering some odd looking self URLs in some cases. I've seen URLs for do_wp_cron, /wp-admin/, etc. Those are clearly not the self reference link for the feed.
Adding a filter would allow the PuSHPress plugin to ensure that the self link is set to the correct feed URL. I'm including a simple patch that applies a 'self_link' filter to the value, then escapes it, then outputs the value.
Only feed_link I found was in get_feed_link(), and it has a filter. Please re-open with feedback if this is still current in trunk.