user_login.' has accessed https://'.get_site_url().'/'.$curr_url.' '; } wp_mail($emails,"Suspicious URL Alert", $message); } } } } /** * Function to manage log deletion * @return bool */ private static function autoDeleteLog() { // global objects global $table_prefix, $wpdb; // get log days $days = get_option('wpasl-log-days', 30); // if unlimited simply ignore if($days<0) { return false; } $sql = "DELETE FROM ".$table_prefix."wpasl_log WHERE datediff(CURDATE(),`datetime`)>=".$days.";"; $wpdb->query($sql); } }