/** * When a Newsletter is deleted: eg. delete recipients from db table */ function alo_em_newsletter_deleted($post_id) { alo_em_delete_newsletter_recipients($post_id); }
// Other info $already_sent = alo_em_count_newsletter_recipients_already_sent($newsletter); $sent_with_success = alo_em_count_newsletter_recipients_already_sent_with_success($newsletter); $sent_with_error = alo_em_count_newsletter_recipients_already_sent_with_error($newsletter); $unique_views = count(alo_em_all_newsletter_trackings($newsletter, '')); $unique_clicks = count(alo_em_all_newsletter_trackings_except_views($newsletter)); } ?> <?php // Archive (delete) detailed info of recipients if (isset($_GET['archive']) && alo_em_get_newsletter_status($newsletter) == "sent") { $archived_recipients = array('tot' => $tot_recipients, 'sent' => $already_sent, 'success' => $sent_with_success, 'error' => $sent_with_error, 'uniqview' => $unique_views, 'uniqclick' => $unique_clicks); add_post_meta($newsletter, "_easymail_archived_recipients", $archived_recipients); alo_em_delete_newsletter_recipients($newsletter); echo "<div class=\"easymail-alert\">" . __("Detailed report was archived", "alo-easymail") . "</div>\n"; } ?> <table class="summary"> <thead><tr> <th scope="col"><?php _e("Total recipients", "alo-easymail"); ?> </th> <th scope="col"><?php _e("Sendings done", "alo-easymail"); ?> </th>