Opened 17 years ago
Closed 17 years ago
#5267 closed enhancement (fixed)
Filter bloginfo_rss only passes one argument
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.5 | Priority: | normal |
Severity: | normal | Version: | 2.3 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
According to The codex the filter bloginfo_rss should pass a second argument, $show, that tells exactly what blog info is called.
However, in feed.php:
function bloginfo_rss($show = '') { echo apply_filters('bloginfo_rss', get_bloginfo_rss($show)); }
Only the content argument is passed.
As expected, when trying to use the second argument in the filter function, I receive a warning: Missing argument 2.
I'm aware that one way to solve this is to remove the wrong part from the codex, but I'm hpoing more towards actually having that feature, becuase right now it makes it impossible for me to filter only bloginfo_rss('name'), for example.
Attachments (1)
Change History (12)
#2
@
17 years ago
They accept a second argument in the same manner as actions,
add_filter('filtername', 'function', priority, argumentcount);
#3
@
17 years ago
Ah, RTFM, huh? Heh.
Wondered why apply_filters('customfiltername', $var1, $var2)
never worked for me...
Can filters even accept a 2nd argument? I thought that was only actions that could.