Make WordPress Core

Opened 12 years ago

Closed 11 years ago

Last modified 9 years ago

#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:


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)

bloginfo_rss.patch (443 bytes) - added by Kafkaesqui 12 years ago.
Patch adds filter hook to bloginfo_rss()
2014.diff (599 bytes) - added by rob1n 11 years ago.

Download all attachments as: .zip

Change History (11)

#1 @Viper007Bond
12 years ago

I'd think the filters should be applied to get_bloginfo_rss(), not bloginfo_rss() as bloginfo_rss() is just an echo wrapper for get_bloginfo_rss().

#2 @Kafkaesqui
12 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 @Kafkaesqui
12 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.

#4 @matt
12 years ago

  • Milestone changed from 2.0 to 2.1

12 years ago

Patch adds filter hook to bloginfo_rss()

#5 @Kafkaesqui
12 years ago

  • Keywords bg|has-patch added

Have added a patch for this.

#6 @matt
11 years ago

  • Milestone changed from 2.1 to 2.2

11 years ago

#7 @rob1n
11 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.

#8 @rob1n
11 years ago

  • Keywords commit added
  • Owner changed from rob1n to ryan
  • Status changed from assigned to new

Assigned to ryan for commit.

#9 @rob1n
11 years ago

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

(In [5134]) Apply the bloginfo_rss filter and change bloginfo_rss filter to get_bloginfo. Props Kafkaesqui. fixes #2014

Note: See TracTickets for help on using tickets.