Skip to content

Instantly share code, notes, and snippets.

@pdewouters
Last active August 29, 2015 14:16
Show Gist options
  • Save pdewouters/951a505c5bb3d775a898 to your computer and use it in GitHub Desktop.
Save pdewouters/951a505c5bb3d775a898 to your computer and use it in GitHub Desktop.
CRON Conditional
// Don't load plugin unless we are in the admin or called by a cron or Ajax request
if ( ! is_admin()
|| ( ! defined( 'DOING_CRON' ) || ! DOING_CRON )
|| ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment