Ok,
I think we are saying the samething, but something is still missing.
1) the subroutine sets STOP or CONTINUE somewhere in it, and returns what was passed in, as well as setting the STOP or CONTINUE flag.
2) the return values from that subroutine are checked by the dispatch, and if STOP, execution stops at that point, and returns to where the hook was initially called (the line after the plug_in dispatch call). No further plug-ins or main code is executed after a "STOP"
3) if CONTINUE is set, then the next plug-in or main code is executed.
Ok..
On a pre-hook, if STOP is called, the main code ie:what was hooked (such as add_modify_form) will not be called. Neither will any further pre-hooks be run.
What about post-hooks? STOP in a pre-hook prevents any post- hooks from running either?
On a post-hook, STOP just prevents further plug-in processing?
Also, if every plugin is registered as "FIRST" there is no way to really know what order things are being called in.
So, it's of tantamount importance that each plug-in behave by the book, and not return values that could crunch or overwrite an other plugins functioning....
Eeek.
PUGDOGŪ PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ