WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#5173 closed enhancement (fixed)

Replace get_category_rss_link with get_category_feed_link

Reported by: ionfish Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.3
Component: Template Keywords: needs-patch
Focuses: Cc:

Description

Replacing get_category_rss_link with a get_category_feed_link function would allow theme authors to use WordPress's Atom feeds instead, if they prefer. get_category_rss_link would be deprecated, but not removed, to keep backwards compatibility with themes which use it.

Attachments (1)

getcatfeedlink.diff (1.4 KB) - added by ionfish 8 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 @foolswisdom8 years ago

  • Keywords has-patch added
  • Milestone set to 2.4

comment:2 @markjaquith8 years ago

  • Keywords needs-patch added; has-patch removed

+1 on the idea. But the patch only addresses default permalinks. People with pretty permalinks wouldn't get the feed type they asked for.

comment:3 @ionfish8 years ago

Good point. I'll tweak the patch. I was also thinking of doing the same for get_author_rss_link, should I add that to this ticket or make a new one?

comment:4 @ryan8 years ago

Look at get_tag_feed_link() and pattern get_category_feed_link() after it. We don't really need to pass the nicename and echo.

comment:5 @ionfish8 years ago

More like it? :)

comment:6 @markjaquith8 years ago

Getting better. On line 150, you need to trailingslashit($link) (like on the old line 138). Otherwise, you could get:

http://example.com/category/foofeed/atom

@ionfish8 years ago

comment:7 @ionfish8 years ago

Any chance of another look-over?

comment:8 @ryan7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [6327]) get_category_feed_link() from ionfish. fixes #5173

comment:9 @ryan7 years ago

(In [6328]) phpdoc for get_category_feed_link(). see #5173

Note: See TracTickets for help on using tickets.