The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Theme dependent plugin Reply To: Theme dependent plugin


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!';