[wp-hackers] Avoiding Side-effects in Filters & Actions (was: Dispay none for different categories)

Frank Bueltge frank at bueltge.de
Wed Mar 25 20:28:54 GMT 2009

maybe you can use the var $pagenow for ask for the site in backend.

On Wed, Mar 25, 2009 at 8:53 PM, Mike Schinkel
<mikeschinkel at newclarity.net>wrote:

> Gerhard:
> Thanks for noting that.
> That brings up a question I have for the list. WordPress' filter and action
> hooks are incredibly flexible but can also result in far too easy creation
> of unexpected and side effects. I've numerous times made a change using a
> filter only to find out that it "broke" something in a completely different
> part of the site and of course those breakages are usually found by the
> client and then they get frustrated with me for breaking "that which already
> works" and ask me "why were you working on that part when you were supposed
> to be working on this other part?"  And in the case of releasing a general
> purpose plugin, such side-effects can cause a real nightmare for end-users
> of the plugin.
> Is there a more robust way to pinpoint and isolate these kind of changes?
>  I've reverted to testing the URLs via $_SERVER['REQUEST_URI'] but that just
> doesn't feel very robust, and in the case of a widget isn't even a solution.
>  How do you guys address these issues, and is there even a good way to do
> so?
> -Mike Schinkel

More information about the wp-hackers mailing list