afragen / wp-dependency-installer

A lightweight class to add to WordPress plugins/themes to automatically install plugin dependencies.
MIT License
205 stars 32 forks source link

Feature: single function to check if all required plugins are active #65

Open cliffordp opened 4 years ago

cliffordp commented 4 years ago

Best I could see from the code is if( empty( $this->notices ) ) is the closest thing that exists, although that array is filterable so could possibly be emptied with unintended side effects of then making such a check result in me thinking my plugin has everything it needs to run.

Maybe a class property/method could be added to be called at any point to see if the run() resulted in any requirements determined to be lacking.

afragen commented 4 years ago

If plugins are set to required: true there’s nothing to check. The plugins will always be active and running. As long as the code is running.