[wp-hackers] Changing two variables listed in apply_filters hook
FUJINAKA Tohru
tohru at nakarika.com
Sun Jul 22 12:52:41 GMT 2007
Oops, I sent code still working but over modificat... how do I say in
English?
Well, I sent one of testing code I wrote but there included no mean reference.
> $first = apply_filters('test-me', 'first', &$second, array(&$second));
the reference `&$second' does not work. So it's good still like:
> $first = apply_filters('test-me', 'first', $second, array(&$second));
Sigh...
In addition, the modification required to a hook source will be like
this:
apply_filters ('get_categories', $categories, $r);
to apply_filters ('get_categories', $categories, $r, array(&$r));
then a filter you'll write:
add_filter ('get_categories', 'my_handler', 10, 2);
function my_handler($cats, $r)
to add_filter ('get_categories', 'my_handler', 10, 3);
function my_handler($cats, $r, $r_array)
{
$r_array[0][..] = ...
Regards,
--
FUJINAKA Tohru aka reedom <tohru at nakarika.com>
More information about the wp-hackers
mailing list