Is it possible to stop a theme activation when a certain plugin is not activated
So I am planning a theme that will depend on a plugin (for instance Timber or Themosis). So of course a theme will break if it can't use it's depending plugin's. So I would like a way to stop the user of activating a theme that needs a certain plugin to work and instead show an friendly error message containing the plugin that's needed.
So far I found out how to check if a plugin is installed or not (link), but how to stop the theme from being activated if that's possible at all?
I also found out about the switch_theme
and the after_switch_theme
actions.
So what I am missing right now is a way to stop the actual activation. Is this possible?
edit: Found this for displaying admin notices/warnings.
Topic activation themes Wordpress
Category Web