bemailr / wp-requirements

Check server and site conditions before activating your WordPress plugin or theme
http://bemailr.github.io/wp-requirements/
GNU General Public License v3.0
7 stars 1 forks source link

Check for is_admin, DOING_AJAX and DOING_CRON #19

Open tivnet opened 8 years ago

tivnet commented 8 years ago

If we should operate only under admin and not AJAX (and not CRON?) then should those checks be in the class, stopping all work if we are at the front, and returning true on validation?

slaFFik commented 8 years ago

I believe that should be a developer decision. That is his/her responsibility to include and launch the code when needed, not the library's.

tivnet commented 8 years ago

Unless we know for sure that no actions on plugins must be performed by us when unattended.

tivnet commented 8 years ago

... then we must prevent those actions from happening.

slaFFik commented 8 years ago

Ok, lets reduce the impact of a library on everything.

tivnet commented 7 years ago

DOING_CRON, I believe, will be covered by DOING_AJAX. They do not go together.

We may want to check for:

  1. is_admin() && !ajax
  2. Current page in admin is plugins.
tivnet commented 7 years ago