[wp-hackers] Checking if a plugin exists
Otto
otto at ottodestruct.com
Sun Jul 25 22:29:29 UTC 2010
On Sun, Jul 25, 2010 at 2:31 PM, Christopher Ross <cross at thisismyurl.com> wrote:
> I'm trying to test is a plugin exists before calling a second plugin, but with little luck. Any suggestion would be great.
>
> What I'm doing is .... if(function_exists('stats_get_api_key')) { ... some code ...;} but it's not returning a positive despite being installed. Is there a better way to do it?
You can't predict the order plugins will load in. Wait for the
plugins_loaded action before doing your check.
-Otto
More information about the wp-hackers
mailing list