Make WordPress Core

Opened 17 years ago

Closed 15 years ago

#4595 closed enhancement (wontfix)

Format of feed (RSS, Atom) should be an option

Reported by: terraces's profile terraces Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.3
Component: Feeds Keywords: needs-patch close
Focuses: Cc:

Description

Summary

Currently, WordPress uses RSS 2.0 as the default format for its syndication feeds
In case anyone wants a different default format, he must hack Wordpress core (or tell users to use /feed/type rather than /feed, but he still needs to change any page / template that links to the feeds).
This patch allows users to choose default RSS type in the admin interface, in the Options / Reading page.

Version

This patch has been created from the current 2.3 SVN code (trunk).

Modified files

  • wp-includes/feed.php: Adds a wp_dropdown_feeds() method, that lists available feed types within <option> items to be used in a <select> list
  • wp-admin/options-reading.php: Displays the <select> list in the RSS options form to let user choose default type. Chosen type is saved as 'rss_format' in the wp_options table
  • wp-includes/functions.php: Use get_options('rss_format') rather than 'rss2' default for feed type

Attachments (6)

rss-patch.txt (2.6 KB) - added by terraces 17 years ago.
4595.diff (2.2 KB) - added by Nazgul 17 years ago.
4595-defaultoption.2.diff (1.9 KB) - added by Otto42 17 years ago.
default_rss_format patch
4595-defaultoption.diff (1.9 KB) - added by Otto42 17 years ago.
default_rss_format patch
4595-feed-format.diff (2.0 KB) - added by lloydbudd 17 years ago.
default_feed_to_atom.zip (535 bytes) - added by peaceablewhale 15 years ago.

Download all attachments as: .zip

Change History (24)

@terraces
17 years ago

#1 @foolswisdom
17 years ago

Hi terraces,

Thank you for contributing to WordPress!

I didn't think this option should be part of the UI, because for almost all people the option is not useful. I would suggestion adjusting the patch to leave it as something that can be set in wp-admin/options.php if really desired.

#2 @terraces
17 years ago

Hi,

Whant do you mean exactly ? I can't see anything that can be directly set in options.php ? Is there another way to save this "RSS type" option in database ? (which is what my patch tries to do)

Thanx

#3 @Nazgul
17 years ago

foolswidon proposes a solution that's somewhere between the current situation and your solution.

Make the feed type an option, but don't add a UI for it to Options - Reading. More options equals more difficult to use, especially with settings that don't mean anything to a large part of our userbase. The power users that do care can change the option through options.php. Not as easy to use, but we're talking about power users anyway.

You could even create a plugin on top of that, which integrates with the GUI, so people that are interested in their feed type can change it easily as well.

@Nazgul
17 years ago

#4 @Nazgul
17 years ago

I've attached a patch for the "option without GUI" possible solution.

#5 @ryan
17 years ago

  • Milestone changed from 2.3 to 2.4 (next)

#6 @Otto42
17 years ago

+1 for hidden option, but I would use default_rss_format as the name of the option.

Complete patch for trunk attached.

@Otto42
17 years ago

default_rss_format patch

@Otto42
17 years ago

default_rss_format patch

#7 @lloydbudd
17 years ago

  • Keywords suggested-improvement removed

Relates to #5328.

#8 @rubys
17 years ago

  • Cc rubys added

#9 @lloydbudd
17 years ago

  • Summary changed from Allow users to choose type of RSS feeds to Format of feed (RSS, Atom) should be an option

#10 @lloydbudd
17 years ago

I understand the naming used by Otto42, it's consistent with other options that begin rss, but time to move fwd ;-) And 'default' seems unnecessary in option name, particularly when sometime it means can be over written by post specific options.

#11 @ffemtcj
17 years ago

  • Milestone changed from 2.5 to 2.6

#12 follow-up: @Otto42
17 years ago

lloyd: I would have no problem with "default_feed_format", however it is actually a default, because it can be overridden by the user requesting the feed (not on a per-post basis). If the user gets /feed/atom, then they get an atom feed, regardless of the setting.

Will refresh this for trunk if anybody is interested.

#13 in reply to: ↑ 12 ; follow-up: @lloydbudd
16 years ago

Replying to Otto42:

however it is actually a default, because it can be overridden by the user
requesting the feed (not on a per-post basis). If the user gets /feed/atom,
then they get an atom feed, regardless of the setting.

Default in the context of options seems to be when it can be overriden on a per post basis, or otherwise in the UI.

#14 in reply to: ↑ 13 @lloydbudd
16 years ago

Replying to lloydbudd:

Default in the context of options seems to be when it can be overriden on a per post basis, or otherwise in the UI.

Bah, but in the context of the functions it is default_feed, so you win ;-)

#15 @Denis-de-Bernardy
15 years ago

  • Component changed from Administration to Feeds
  • Keywords needs-patch close dup added; has-patch removed
  • Milestone changed from 2.9 to Future Release

I'm pretty sure there is a dup of this one in the Feeds component.

#16 follow-up: @Denis-de-Bernardy
15 years ago

  • Keywords dup removed

the UI should be done in a plugin imo. suggesting wontfix.

see #5802 for the rest.

#17 in reply to: ↑ 16 @peaceablewhale
15 years ago

Replying to Denis-de-Bernardy:

the UI should be done in a plugin imo. suggesting wontfix.

see #5802 for the rest.

Agree. I have attached a plugin (default_feed_to_atom.zip) to this report in case anybody needs an idea how to write the plugin.

#18 @Denis-de-Bernardy
15 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.