[wp-hackers] filters with multiple parameters?

Austin Matzko if.website at gmail.com
Mon Nov 19 15:28:38 GMT 2007


On Nov 19, 2007 10:20 AM, Stephen Rider <wp-hackers at striderweb.com> wrote:
> I've been beating my head against this, and would appreciate an assist:
>
> I'm trying to use add_filter, but the hook in question has multiple
> parameters passed and I can't figure out how to access the second
> parameter.  Example code:
>
> add_filter( 'bloginfo', 'my_bloginfo_filter' );

You have to specify the number of arguments.  See
http://codex.wordpress.org/Plugin_API#Hook_to_WordPress

So it would look like add_filter( 'bloginfo', 'my_bloginfo_filter' , 10, 2);


More information about the wp-hackers mailing list