Ticket #4595 (new enhancement)

Opened 10 months ago

Last modified 1 month ago

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

Reported by: terraces Assigned to: anonymous
Priority: normal Milestone: 2.6
Component: Administration Version: 2.3
Severity: normal Keywords: has-patch
Cc: rubys

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

rss-patch.txt (2.6 kB) - added by terraces on 07/08/07 16:10:43.
4595.diff (2.2 kB) - added by Nazgul on 07/21/07 12:39:04.
4595-defaultoption.2.diff (1.9 kB) - added by Otto42 on 09/12/07 14:59:55.
default_rss_format patch
4595-defaultoption.diff (1.9 kB) - added by Otto42 on 09/12/07 15:00:01.
default_rss_format patch
4595-feed-format.diff (2.0 kB) - added by lloydbudd on 11/14/07 20:34:21.

Change History

07/08/07 16:10:43 changed by terraces

  • attachment rss-patch.txt added.

07/09/07 21:47:07 changed by foolswisdom

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.

07/21/07 12:00:24 changed by terraces

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

07/21/07 12:16:55 changed by Nazgul

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.

07/21/07 12:39:04 changed by Nazgul

  • attachment 4595.diff added.

07/21/07 12:40:26 changed by Nazgul

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

09/12/07 02:46:57 changed by ryan

  • milestone changed from 2.3 to 2.4 (next).

09/12/07 14:58:54 changed by Otto42

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

Complete patch for trunk attached.

09/12/07 14:59:55 changed by Otto42

  • attachment 4595-defaultoption.2.diff added.

default_rss_format patch

09/12/07 15:00:01 changed by Otto42

  • attachment 4595-defaultoption.diff added.

default_rss_format patch

11/10/07 22:55:25 changed by lloydbudd

  • keywords changed from has-patch, suggested-improvement to has-patch.

Relates to #5328.

11/11/07 19:35:16 changed by rubys

  • cc set to rubys.

11/14/07 20:22:01 changed by lloydbudd

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

11/14/07 20:34:21 changed by lloydbudd

  • attachment 4595-feed-format.diff added.

11/14/07 20:37:55 changed by lloydbudd

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.

03/19/08 11:47:58 changed by ffemtcj

  • milestone changed from 2.5 to 2.6.

04/04/08 19:02:31 changed by Otto42

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.