WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 8 years ago

Last modified 6 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:

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)

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

Download all attachments as: .zip

Change History (11)

comment:1 @Viper007Bond10 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().

comment:2 @Kafkaesqui10 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().

comment:3 @Kafkaesqui10 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.

comment:4 @matt10 years ago

  • Milestone changed from 2.0 to 2.1

@Kafkaesqui9 years ago

Patch adds filter hook to bloginfo_rss()

comment:5 @Kafkaesqui9 years ago

  • Keywords bg|has-patch added

Have added a patch for this.

comment:6 @matt9 years ago

  • Milestone changed from 2.1 to 2.2

@rob1n8 years ago

comment:7 @rob1n8 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.

comment:8 @rob1n8 years ago

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

Assigned to ryan for commit.

comment:9 @rob1n8 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.