[wp-hackers] Committed patch needs tweaking...
Peter Westwood
peter.westwood at ftwr.co.uk
Wed Nov 26 07:44:24 GMT 2008
Stephen Rider wrote:
> In 2.7 we're adding some new hooks, like so:
>
> do_action( 'after_plugin_row', $plugin_file, $plugin_data, $context );
> // then a new one...
> do_action( "after_plugin_row_$plugin_file", $plugin_data, $context );
>
> $action_links = apply_filters('plugin_action_links', $action_links,
> $plugin_file, $plugin_data, $context);
> // then a new one...
> $action_links = apply_filters("plugin_action_links_$plugin_file",
> $action_links, $plugin_data, $context);
>
> The '_$plugin_file' versions of each are new. It was my own patch,
> and it is committed, but I'm starting to think it should be tweaked a
> bit.
>
> In short, I think we should still be passing the $plugin_file
> parameter, as within the hooked function we don't actually have access
> to that. That is, if you can hook
> add_action("after_plugin_row_$plugin_file", 'myfunction');
> ... then myfunction ironically doesn't actually have access to
> $plugin_file.
>
> Can this be fixed before 2.7 final?
It would seem to make sense to me.
It makes the argument list the same for both hooks then which help
people write backward compatible plugins too.
Does anyone have an opposition to this?
westi
--
Peter Westwood
http://blog.ftwr.co.uk | http://westi.wordpress.com
C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5
More information about the wp-hackers
mailing list