Opened 12 years ago
Closed 9 years ago
#23677 closed enhancement (fixed)
Feed autodiscovery for custom taxonomy and perhaps date archives
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | Feeds | Keywords: | has-patch |
Focuses: | Cc: |
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)
Change History (10)
#3
@
10 years ago
- Owner set to stevenkword
- Status changed from new to assigned
This looks good to me and has been refreshed in 23677-refresh.diff
#4
@
9 years ago
@wonderboymusic Would you mind taking a look to see if you have any additional thoughts on this?
Suggested patch to add autodiscovery of feeds for custom taxonomy archives.