[wp-hackers] Avoiding Side-effects in Filters & Actions

Mike Schinkel mikeschinkel at newclarity.net
Wed Mar 25 21:01:51 GMT 2009


"Peter Westwood" <peter.westwood at ftwr.co.uk> wrote:
> It maybe that if the way you have approached the problem 
> solution is to use a generic filter for a specific case 
> rather than a specific filter.

Thanks for the reply. This makes perfect sense, and is what I'd try to do, when available.

> It may be that the specific filter isn't available - but 
> if you need more actions / filters please ask and you 
> shall have them.

It's very good to know that there is a willingness to add, but that approach is not a panacea. Adding to a current project requires hacking the existing installation and hopes that the hack will be applied the same to future versions of WP. And there's the necessary time consuming political process of convincing people that there is a really such a need.

Also, there are likely to be a very large number of needs for a more specific filter and adding more and more hooks would cause serious bloat. Whatever the current list of available hooks is at best always a balance.  

What I was hoping for was a robust way to identify the current context so that there isn't a need to go adding more hooks all the time.

-Mike Schinkel
Custom Wordpress Plugins
http://mikeschinkel.com/custom-wordpress-plugins


More information about the wp-hackers mailing list