Foundation - Source Excerpt 23
Summary
This source excerpt preserves a bounded section of Anti-Christ.org/wp-content/plugins/fftac-foundation-core/inc/foundation.php so readers can inspect the evidence without opening the full source file.
**Source path:** Anti-Christ.org/wp-content/plugins/fftac-foundation-core/inc/foundation.php
if (function_exists('antichrist_engine_foundation_participants_database_get_status')) {
$participants_status = antichrist_engine_foundation_participants_database_get_status();
$lines[] = '';
$lines[] = 'Participants Database bridge:';
$lines[] = ' Status: ' . strtoupper((string) ($participants_status['status'] ?? 'attention'));
$lines[] = ' Installed: ' . (!empty($participants_status['installed']) ? 'yes' : 'no');
$lines[] = ' Active: ' . (!empty($participants_status['available']) ? 'yes' : 'no');
$lines[] = ' Synced local intake: ' . (int) ($participants_status['synced_count'] ?? 0);
$lines[] = ' Synced member profiles: ' . (int) ($participants_status['member_synced_count'] ?? 0);
if (!empty($participants_status['missing_fields'])) {
$lines[] = ' Missing fields: ' . implode(', ', (array) $participants_status['missing_fields']);
}
$lines[] = ' Next: ' . (string) ($participants_status['action'] ?? '');
}
$lines[] = '';
$lines[] = 'Machine-readable routes:';
$lines[] = ' XML sitemap: ' . home_url('/wp-sitemap.xml');
$lines[] = ' Research overview: ' . (string) ($api_routes['overview'] ?? '');
$lines[] = ' Research export: ' . (string) ($api_routes['export'] ?? '');
foreach ($download_routes as $label => $url) {
$lines[] = ' ' . $label . ': ' . $url;
}
$lines[] = '';
$lines[] = 'Remaining external launch work:';
$lines[] = ' - Hosting, CDN/reverse proxy, DNS, TLS, WAF/bot protection, and rollback ownership.';
$lines[] = ' - Automated backups, restore test, uptime checks, error monitoring, and log review ownership.';
$lines[] = ' - Privacy-aware analytics, Search Console, sitemap submission, and launch dashboard.';
$lines[] = ' - Newsletter/email deliverability, support/payment tooling, and intake triage outside WordPress when scale requires it.';
$lines[] = ' - Final rendered-page proofread after provisioning, admin edits, and first posts are in place.';
return implode("\n", $lines) . "\n";
}
/**
* Streams the admin-only launch handoff packet.
*
* @return void
*/
function antichrist_engine_foundation_handle_launch_handoff_export()
{
if (!current_user_can('manage_options')) {
wp_die(esc_html__('You are not allowed to export launch handoff data.', 'antichrist-engine'));
}
check_admin_referer('antichrist_engine_export_launch_handoff');
$filename = 'fftac-launch-handoff-' . gmdate('Ymd-His') . '.txt';
header('Content-Type: text/plain; charset=utf-8');
header('Content-Disposition: attachment; filename="' . $filename . '"');
echo antichrist_engine_foundation_get_launch_handoff_text();
exit;
}
add_action('admin_post_antichrist_engine_export_launch_handoff', 'antichrist_engine_foundation_handle_launch_handoff_export');
/**
* Registers the internal launch-readiness admin page.
*
* @return void
*/
function antichrist_engine_foundation_register_launch_readiness_page()
{
add_management_page(
__('FFTAC Launch Readiness', 'antichrist-engine'),
__('FFTAC Launch Readiness', 'antichrist-engine'),
'manage_options',
'fftac-launch-readiness',
'antichrist_engine_foundation_render_launch_readiness_page'
);
}
add_action('admin_menu', 'antichrist_engine_foundation_register_launch_readiness_page');
/**
* Renders the internal launch-readiness admin page.
*
* @return void
*/
function antichrist_engine_foundation_render_launch_readiness_page()
{
if (!current_user_can('manage_options')) {
return;
}
$checks = antichrist_engine_foundation_get_launch_readiness_checks();
$summary = antichrist_engine_foundation_get_launch_readiness_summary($checks);
$security_headers = antichrist_engine_foundation_get_security_headers();
$intake_summary = antichrist_engine_foundation_get_intake_operations_summary();
$operations_checklist = antichrist_engine_foundation_get_launch_operations_checklist();
$handoff_export_url = antichrist_engine_foundation_get_launch_handoff_export_url();
echo '<div class="wrap">';
echo '<h1>' . esc_html__('FFTAC Launch Readiness', 'antichrist-engine') . '</h1>';
echo '<p>' . esc_html__('Internal prelaunch checklist generated from theme state. Markdown files remain internal instructions; this page is the WordPress-admin view of the same operating posture.', 'antichrist-engine') . '</p>';
echo '<p><a class="button button-primary" href="' . esc_url($handoff_export_url) . '">' . esc_html__('Download launch handoff TXT', 'antichrist-engine') . '</a></p>';
echo '<p><strong>' . esc_html__('Ready:', 'antichrist-engine') . '</strong> ' . esc_html((string) ($summary['ready'] ?? 0)) . ' ';
echo '<strong>' . esc_html__('Needs attention:', 'antichrist-engine') . '</strong> ' . esc_html((string) ($summary['attention'] ?? 0)) . ' ';
echo '<strong>' . esc_html__('Blocked:', 'antichrist-engine') . '</strong> ' . esc_html((string) ($summary['blocked'] ?? 0)) . '</p>';
echo '<table class="widefat striped"><thead><tr>';
echo '<th>' . esc_html__('Check', 'antichrist-engine') . '</th>';
echo '<th>' . esc_html__('Status', 'antichrist-engine') . '</th>';
echo '<th>' . esc_html__('Summary', 'antichrist-engine') . '</th>';
echo '<th>' . esc_html__('Next action', 'antichrist-engine') . '</th>';
echo '</tr></thead><tbody>';
foreach ($checks as $check) {
$status = sanitize_key((string) ($check['status'] ?? 'attention'));
echo '<tr>';
echo '<td><strong>' . esc_html((string) ($check['label'] ?? '')) . '</strong></td>';
echo '<td>' . esc_html(ucfirst($status)) . '</td>';
echo '<td>' . esc_html((string) ($check['summary'] ?? '')) . '</td>';
echo '<td>' . esc_html((string) ($check['action'] ?? '')) . '</td>';
echo '</tr>';
}
echo '</tbody></table>';
echo '<h2>' . esc_html__('Go-Live Operations Checklist', 'antichrist-engine') . '</h2>';
echo '<p>' . esc_html__('This checklist translates the internal docs and active roadmap into an operator-facing handoff. Theme-owned items can be inspected here; external hosting, analytics, email, payment, and editorial signoff still need human owners.', 'antichrist-engine') . '</p>';
echo '<table class="widefat striped"><thead><tr>';
echo '<th>' . esc_html__('Area', 'antichrist-engine') . '</th>';
echo '<th>' . esc_html__('Status', 'antichrist-engine') . '</th>';
echo '<th>' . esc_html__('Summary', 'antichrist-engine') . '</th>';
echo '<th>' . esc_html__('Actions', 'antichrist-engine') . '</th>';
echo '</tr></thead><tbody>';
foreach ($operations_checklist as $item) {
$status = sanitize_key((string) ($item['status'] ?? 'attention'));
echo '<tr>';
echo '<td><strong>' . esc_html((string) ($item['label'] ?? '')) . '</strong></td>';
echo '<td>' . esc_html(ucfirst($status)) . '</td>';
echo '<td>' . esc_html((string) ($item['summary'] ?? '')) . '</td>';
echo '<td><ul>';
foreach ((array) ($item['actions'] ?? array()) as $action) {
echo '<li>' . esc_html((string) $action) . '</li>';
}
echo '</ul></td>';
echo '</tr>';
}
echo '</tbody></table>';
echo '<h2>' . esc_html__('Launch Intake Operations', 'antichrist-engine') . '</h2>';
echo '<p>' . esc_html__('Admin-only CSV exports for the private records collected by public launch forms. Use these before moving Signals, support, contact, or program records into external tooling.', 'antichrist-engine') . '</p>';
echo '<table class="widefat striped"><thead><tr>';
echo '<th>' . esc_html__('Record set', 'antichrist-engine') . '</th>';
echo '<th>' . esc_html__('Stored records', 'antichrist-engine') . '</th>';
echo '<th>' . esc_html__('Operational note', 'antichrist-engine') . '</th>';
echo '<th>' . esc_html__('Export', 'antichrist-engine') . '</th>';
echo '</tr></thead><tbody>';
foreach ($intake_summary as $source_key => $source) {
echo '<tr>';
echo '<td><strong>' . esc_html((string) ($source['label'] ?? $source_key)) . '</strong></td>';
echo '<td>' . esc_html((string) ($source['count'] ?? 0)) . '</td>';
echo '<td>' . esc_html((string) ($source['description'] ?? '')) . '</td>';
echo '<td><a class="button button-secondary" href="' . esc_url((string) ($source['export_url'] ?? '')) . '">' . esc_html__('Download CSV', 'antichrist-engine') . '</a></td>';
echo '</tr>';
}