#2014 closed defect (bug) (fixed)
Filters not applied to bloginfo_rss()
Reported by: | Kafkaesqui | Owned by: | ryan |
---|---|---|---|
Milestone: | 2.2 | Priority: | normal |
Severity: | normal | Version: | 2.0 |
Component: | Administration | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
Currently bloginfo_rss() lacks a filter hook:
function bloginfo_rss($show = '') { echo get_bloginfo_rss($show); }
It should probably be more like:
function bloginfo_rss($show = '') { $info = get_bloginfo_rss($show); $info = apply_filters('bloginfo_rss', $info, $show); echo $info; }
Attachments (2)
Change History (11)
#2
@
19 years ago
I'm agreeable to that, but then this should be looked at for bloginfo()/get_bloginfo(): the limited filter handling there presently goes through bloginfo(), not get_bloginfo().
#3
@
19 years ago
Actually, I take it back.
There are reasons where I might need to bypass filters (I just ran into one). Having them outside the get_* functions provides a way to do that. A case could be made that having filters in the get_* functions can benefit plugin developers as well (ah, decisions!) but for now I have to recommend sticking with current WP design and filter only on bloginfo/bloginfo_rss.
#7
@
18 years ago
- Keywords has-patch added; bloginfo_rss filters bg|has-patch removed
- Owner changed from anonymous to rob1n
- Status changed from new to assigned
Patch refreshed, and a filter name changed.
Also, having get_bloginfo_rss apply a get_bloginfo_rss filter and then bloginfo_rss applying bloginfo_rss on top of that mirrors get_bloginfo and bloginfo's functions.
I'd think the filters should be applied to
get_bloginfo_rss()
, notbloginfo_rss()
asbloginfo_rss()
is just an echo wrapper forget_bloginfo_rss()
.