Detecting activated plugin with function_exists?
-
I’m trying to hide or show a couple of links depending on whether a plugin is activated or not. Below is the simple code I am using in the header.php file, after the body tag. The code always spits out the else case. (Currently attempting to detect wp-cache, which I know is activated). Is the Plugin information not available to WordPress when the header file is read? Is there another solution? Thanks!
<?php if (function_exists('wp-cache')) { echo <li>this function exists</li>; }else { echo <li>this function does not exist</li>; }?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Detecting activated plugin with function_exists?’ is closed to new replies.