Review Emails
Please review each mail template and approve it, or suggest changes. Use the check mark to add each suggestion to its submitted changes. After the updates are made and every change is marked complete, choose 100% Accepted for that template. This page records reviews; it does not edit Mailchimp.
= PAEmailReviewEscape($groupTitle) ?>
= count($groups[$groupKey]) ?> templatesOpen changes first, then templates updated after approval. Remaining emails are ordered by emergency contacts, detective requests, case updates, shop and billing, and account messages. Test templates are last.
No templates in this section.
$name): $row = $reviews[$name]; $items = $changes[$name] ?? []; $changeOrder = ['Open'=>0, 'Completed'=>1, 'Withdrawn'=>2]; usort($items, static function ($a, $b) use ($changeOrder): int { $state = ($changeOrder[$a['Status']] ?? 3) <=> ($changeOrder[$b['Status']] ?? 3); return $state ?: ((int)$b['ReviewChangeID'] <=> (int)$a['ReviewChangeID']); }); $openItems = array_values(array_filter($items, static fn($item) => $item['Status'] === 'Open')); $completedItems = array_values(array_filter($items, static fn($item) => $item['Status'] === 'Completed')); $withdrawnItems = array_values(array_filter($items, static fn($item) => $item['Status'] === 'Withdrawn')); $template = $templateByName[$name] ?? []; $draftOnly = $mailchimpError === '' && trim((string)($template['publish_code'] ?? '')) === ''; $changedSinceAcceptance = $row['AcceptedHash'] !== null && !hash_equals($row['CurrentHash'], $row['AcceptedHash']); $subject = (string)($template['publish_subject'] ?? ''); if ($subject === '') $subject = (string)($template['subject'] ?? ''); $subject = PAEmailReviewPreviewText($subject); $visibleBody = PAReviewVisibleEmailText(PAEmailReviewCode($template)); $searchText = mb_strtolower(preg_replace('/\s+/u', ' ', implode(' ', [$name, $subject, (string)($template['publish_subject'] ?? ''), (string)($template['subject'] ?? ''), $visibleBody, PAEmailReviewPreviewText($visibleBody), (string)($template['publish_text'] ?? ''), (string)($template['text'] ?? '')])), 'UTF-8'); $capitalization = $capitalizationByName[$name] ?? []; [$priorityRank, $priorityLabel] = PAEmailReviewPriority($name); $previewURL = 'index.php?p=email_review_preview&name=' . rawurlencode($name); ?>#= str_pad((string)($index + 1), 2, '0', STR_PAD_LEFT) ?>of = count($groups[$groupKey]) ?>= PAEmailReviewEscape($priorityLabel) ?>= PAEmailReviewEscape($name) ?>= $subject !== '' ? 'Subject: ' . PAEmailReviewEscape($subject) : ($draftOnly ? 'Draft only' : 'Published template') ?>= count($capitalization) ?>Capitalization = count($capitalization) === 1 ? 'suggestion' : 'suggestions' ?>DraftUpdated since approval = count($openItems) ?> = count($openItems) === 1 ? 'change' : 'changes' ?> to finish= $groupKey === 'accepted' ? 'Accepted' : 'Please Review' ?>
Email preview
Fictional sample details; links are inactive.Preview unavailable until Mailchimp reconnects.
Capitalization check = count($capitalization) ?> = count($capitalization) === 1 ? 'suggestion' : 'suggestions' ?>
No likely missed sentence capitals found. Please still review names and wording.
Submitted changes
= count($openItems) ?> to finish / = count($completedItems) ?> completed= $withdrawnItems ? ' / ' . count($withdrawnItems) . ' withdrawn' : '' ?>No changes submitted for this template.
= nl2br(PAEmailReviewEscape($item['CurrentText'])) ?>
= nl2br(PAEmailReviewEscape($item['ReplacementText'])) ?>