Reputation: 43
which is the main class for W3 Total Cache plugin? I need to detect if plugin active or not from functions.php file.
Upvotes: 0
Views: 834
Reputation: 829
You can do this:
if ( defined( 'W3TC' ) ) {
/* W3 Total Cache is active */
}
I would suggest that you use this within a hook though to avoid the possibility that your PHP file is processed before W3TC.
Upvotes: 2