Opened 17 years ago
Closed 13 years ago
#10434 closed enhancement (fixed)
New filter request in feed.php
| Reported by: | mogman1 | Owned by: | nacin |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.6 |
| Component: | Feeds | Version: | 3.5 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
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)
#2
@
14 years ago
- Cc added
- Keywords has-patch added
- Milestone → Awaiting Review
- Resolution worksforme
- Status closed → reopened
- Version → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.