Check for active plugin

$plugins = get_option('active_plugins');
$required_plugin = 'PLUGIN-DIRECTORY/PLUGINFILE.php';
$debug_queries_on = FALSE;
if ( in_array( $required_plugin , $plugins ) ) {
$debug_queries_on = TRUE; // Example for yes, it's active
}

if ($debug_queries_on){
//THIS IS THE CODE TO RUN IF PLUGIN IS ACTIVE
}

0 Comments

You must be logged in to post a comment.