Opened 17 years ago
Closed 17 years ago
#9712 closed enhancement (fixed)
Filter request: Post comments feed link HTML
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 2.8 | Priority: | normal |
| Severity: | normal | Version: | 2.7.1 |
| Component: | Plugins | Keywords: | has-patch tested |
| Focuses: | Cc: |
Description
This filter allows rel/style/class/title attributes to be added to the post comments RSS link.
I'd like to use this filter in a plugin I'm developing. Thanks for your consideration.
Attachments (2)
Change History (11)
#2
@
17 years ago
The post_comments_feed_link hook filters the link's URL only.
This proposed post_comments_feed_link_html hook would filter the entire <a> element, allowing rel/style/class/title attributes to be added.
#3
@
17 years ago
- Keywords 2nd-opinion added
maybe the_post_comments_feed_link, to make it consistent with the other hooks?
there also are a couple of other areas where it's called, which might want the filter too.
#4
@
17 years ago
Right, it we wanted to be totally consistent, we should rename the existing "the_post_comments_feed_link" filter to "get_post_comments_feed_link" and name this new filter "the_post_comments_feed_link".
Although that would be ideal, such a change could break existing plugins, which is why I suggested that, instead, we could add "_html" to the end of the new hook that would filter the <a> HTML.
#7
follow-up:
↓ 8
@
17 years ago
- Keywords tested added; 2nd-opinion dev-feedback removed
I'd remove the $link_text from the filter's arguments, personally.
#8
in reply to:
↑ 7
@
17 years ago
Replying to Denis-de-Bernardy:
I'd remove the $link_text from the filter's arguments, personally.
Good point; the $link_text can be obtained by running strip_tags() on the filter's first argument.
I named the filter "post_comments_feed_link_html" because "post_comments_feed_link" is already used to filter the href URL.