/**
  *
  */
 public function spamlytics_new_daily_data()
 {
     $settings = \SpamLyticsHelper::get_settings();
     if ($settings['api_key'] !== '') {
         $fetcher = new Fetcher($settings['api_key']);
         $fetcher->check_for_updates();
     }
 }
 /**
  * Listen for referral urls
  */
 public function __construct()
 {
     $this->settings = \SpamLyticsHelper::get_settings();
     $referrer = $this->filter_url($_SERVER['HTTP_REFERER']);
     new Ga($referrer);
     new Ip($_SERVER['REMOTE_ADDR']);
     new Referral($_SERVER['HTTP_REFERER']);
     new Comments($this->settings);
 }
 /**
  * Admin initiated, hook the things we need for SpamLytics
  */
 public function __construct()
 {
     $this->settings_class = new Settings();
     $this->settings = \SpamLyticsHelper::get_settings();
     // add_actions
     add_action('admin_menu', array($this, 'hook_submenu_items'));
     add_filter('plugin_action_links_' . plugin_basename(SPAMLYTICS_ROOT_PATH), array($this, 'plugin_actions'));
     add_action('init', array($this, 'init_admin'));
     add_action('admin_enqueue_scripts', array($this, 'hook_admin_style'));
     add_action('admin_notices', array($this, 'post_type_info'));
     // If the user has enabled diagnostic data, we'll need to hook in the comments for spam.
     if ((bool) $this->settings['sent_data'] === true) {
         add_action('transition_comment_status', array($this, 'report_spam_hook'), 10, 3);
     }
     new Comments();
     $this->check_admin_message();
 }
 /**
  * Construct the settings page
  */
 public function __construct()
 {
     $this->settings = \SpamLyticsHelper::get_settings();
     $this->comment_stats = get_transient('spamlytics_comment_stats');
 }
 /**
  * Verify a comment from the admin interface and update the comment status if needed
  *
  * @param $id
  */
 private function verify_comment($id)
 {
     $frontend_class = new \SpamLytics\Frontend\Comments(\SpamLyticsHelper::get_settings());
     $frontend_class->check_for_spam($id, get_comment($id));
 }