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


Hello Allen,

Thanks for your reply. As I can see my code, I can find some typos and issues.

This line should be deactivate_plugins('plugin-folder/my-plugin.php');

And I forgot to add the filter which is

add_action ('admin_init', 'plugin_activation_check');

Now coming to your question, my plugin is using a page-builder which is available only in the theme (Elegant Themes Divi & Extra). Now I need to use the Page builder else this will not work. Now the problem is, not all themes will have that page-builder, of course. So, 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.

Anyway, I am just jumping to your solution and see if it helps. Give you an update once tried.

Thanks a lot