[wp-hackers] Degrading gracefully with deactivated plugins?
Brian Dupuis
wordpress at coldforged.org
Sun Mar 27 15:42:35 GMT 2005
David House wrote:
>If you wanted to do a bit more work, you could scan plugin files for
>functions defined, then for each of them create a new function called
><funcname>_safe or (e.g., if a plugin defined 'foo_func', then this
>new function would be foo_func_safe()), which would do the
>function_exists() logic.
>
>This would just involve looping over the code, quitting when the
>regular expression no longer matches and defining a new function that
>takes exactly the same arguments as the standard function using
>variable variables. (I wrote something of the kind for the echo/return
>thread [1]).
>
Isn't that a bit chicken and egg? If the plugin doesn't exist to begin
with, there's no code to loop over, hence no foo_func_safe() define
hence we're back where we started. Unless I'm missing something basic.
More information about the wp-hackers
mailing list