WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#19017 new defect (bug)

No way to add XSL to Feeds

Reported by: pathawks Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 3.2.1
Component: Feeds Keywords: has-patch
Focuses: Cc:

Description

To add XSL to a feed, for nicer display of feeds in browser, a line needs to be inserted before the root RSS tag.
For a plugin to add the correct code, there should be an action between <?xml?> and <rss>`
Perhaps something like <?php do_action('rss2_xsl'); ?> on line 12 of feed-rss2.php?

Attachments (1)

19017.diff (2.9 KB) - added by solarissmoke 2 years ago.
Add an action after the XML declaration in feeds to allow the insertion of style information (and anything else)

Download all attachments as: .zip

Change History (4)

comment:1 solarissmoke2 years ago

FWIW there are a few plugins out there that do this sort of thing, e.g., Advanced RSS. But if a new action is added, I think it should be more generic and future-proof - something like rss_pre, maybe.

comment:2 follow-up: pathawks2 years ago

Correct me if I'm wrong, but it looks like Advanced RSS is only a styled RSS widget that you can include in your sidebar.

I am looking for something that will change the way a site's feed will look when viewed in a browser, similar to Feedburner's 'BrowserFriendly' option.

comment:3 in reply to: ↑ 2 solarissmoke2 years ago

  • Keywords has-patch added; needs-patch removed

Replying to pathawks:

Correct me if I'm wrong, but it looks like Advanced RSS is only a styled RSS widget that you can include in your sidebar.

Sorry, my mistake.

Attaching at patch that adds a pre action to the various feeds.

solarissmoke2 years ago

Add an action after the XML declaration in feeds to allow the insertion of style information (and anything else)

Note: See TracTickets for help on using tickets.