Home › Forums › Back End › Theme dependent plugin › Reply To: Theme dependent plugin
December 27, 2015 at 6:57 am
#236195
Participant
I just want to get the plugin deactivated if those themes (Divi or Extra) are not found since without that my plugin features will be useless and also, the site may crash as it’s calling a theme function.
I’m not familiar with that specific page builder. But I’m guessing it’s a PHP class. So instead of testing for the name of the theme, test if the class exists. So something like…
if ( ! class_exists( 'PageBuilderClassHere' ) ) {
echo 'You are not good enough for me!';
return;
}