Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required Conditions Fulfilled #638

Closed
Aternus opened this issue Oct 31, 2016 · 1 comment
Closed

Required Conditions Fulfilled #638

Aternus opened this issue Oct 31, 2016 · 1 comment

Comments

@Aternus
Copy link

Aternus commented Oct 31, 2016

Is there a way to check whether all required plugins have been installed before continuing with the theme code execution?

I would like to halt (gracefully) and show an error message on the front end for users without the required plugins.

@jrfnl
Copy link
Contributor

jrfnl commented Oct 31, 2016

Duplicate of #484 #485 and #550.

You can use TGM_Plugin_Activation::get_instance()->is_tgmpa_complete(), but as this method is meant for internal use, it will report false if there are plugins which need updates or optional plugins which haven't been installed.

Alternatively - in your case this might be the better option - you can pass your list of required plugins through a foreach() checking each with the WP native is_plugin_active().

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants