Make WordPress Core

Opened 13 years ago

Closed 10 years ago

#23677 closed enhancement (fixed)

Feed autodiscovery for custom taxonomy and perhaps date archives

Reported by: mdgl Owned by: stevenkword
Priority: normal Milestone: 4.5
Component: Feeds Version: 3.5
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

In #21648 we enabled the "autodiscovery" of feeds for custom post types. Further review of this solution reveals a few remaining issues:

a) Function feed_links_extra() in file wp-includes/general-template.php still does not add <link> tags for autodiscovery of either custom taxonomy archives or date (year/month/day) archives. You can argue that feeds for date archives might not be particularly useful, but they are generated, so why do we not provide links to them? A helper function does exist to obtain the link for custom taxonomy archive feeds, but there is no corresponding support for date archives.

b) The helper functions for obtaining feed links in file link-template.php are not particularly easy to use, requiring much examination of the queried object. If a theme or plugin wishes to include explicit hyperlinks to feeds (i.e. <a> tags) then it is presently forced to duplicate much of the code from function feed_links_extra(). I suggest the bulk of the code from here should be moved into a new function within link-template.php where it can be reused to generate either <link> or <a> tags as needed.

c) We seem to have a helper function for feeds containing search results with comments (get_search_comments_feed_link() in wp-includes/link-template.php). Whilst this feed is generated, it's not clear why "search" is treated specially here and why if this was considered useful there are no corresponding feeds for comments on other archives.

Attachments (3)

23677-taxonomy.diff (1.3 KB ) - added by mdgl 13 years ago.
Suggested patch to add autodiscovery of feeds for custom taxonomy archives.
23677-refresh.diff (1.3 KB ) - added by stevenkword 11 years ago.
23677-refresh.2.diff (1.3 KB ) - added by stevenkword 11 years ago.
Refresh relative to /src

Download all attachments as: .zip

Change History (10)

@mdgl
13 years ago

Suggested patch to add autodiscovery of feeds for custom taxonomy archives.

#1 @iseulde
13 years ago

  • Component GeneralFeeds

#2 @stevenkword
12 years ago

  • Keywords has-patch added

#3 @stevenkword
11 years ago

  • Owner set to stevenkword
  • Status newassigned

This looks good to me and has been refreshed in 23677-refresh.diff

Version 0, edited 11 years ago by stevenkword (next)

#4 @stevenkword
11 years ago

@wonderboymusic Would you mind taking a look to see if you have any additional thoughts on this?

@stevenkword
11 years ago

Refresh relative to /src

#5 @stevenkword
11 years ago

  • Milestone Awaiting Review4.5

This ticket was mentioned in Slack in #core by jorbin. View the logs.


10 years ago

#7 @jorbin
10 years ago

  • Resolutionfixed
  • Status assignedclosed

In 36671:

Make Custom Taxonomy Feeds Auto-discoverable

This helps improve the parity between custom taxonomies and built in taxonomies. It is one small step to #makeCustomTaxonomyFeedsGreatAgain.

Fixes #23677
Props mdgl, stevenkword

Note: See TracTickets for help on using tickets.