[wp-hackers] How to tell if a plugin is active?
Dave
support at textbones.com
Wed Jun 30 16:55:45 UTC 2004
I don't have any experience with WordPress plugins but I understand that
the functions in the plugins attach themselves to hooks in the code?
If so, why not simply add a custom hook to the page rather than call the
function directly? That way the page would function the same whether or
not the plugin is active.
Regardless, there should be a function to test if a plugin is active,
but I don't know of one.
Ian Barton wrote:
> Wilst experimenting with plugins I often end up temporarily disabling
> them in the Comntrol Panel. Often this can cause index.php to crash
> with "function not found" type errors:<(
>
> Is it possible to tell if a plugin is currently active, so that I can
> write code like:
>
> if (MyPluginActive)
> <?php myplugin_function?>
> else
> print "Plugin MyPluginnot active"
>
> Ian.
>
>
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
More information about the hackers
mailing list