Skip to content
wiki.fftac.org

Foundation - Source Excerpt 22

Back to Foundation

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

(string) ($visibility['mode'] ?? 'preview')
                ),
            'actions' => array(
                __('Use preview/private mode during proofing and stakeholder review only.', 'antichrist-engine'),
                __('Keep public mode for production launch after DNS, Search Console, sitemap submission, and promotion timing are ready.', 'antichrist-engine'),
            ),
        ),
        array(
            'id'      => 'editorial-proof',
            'label'   => __('Rendered-page proof', 'antichrist-engine'),
            'status'  => 'attention',
            'summary' => sprintf(
                /* translators: %d is the number of final proof gates. */
                _n('%d final proof gate is defined on the Standards page.', '%d final proof gates are defined on the Standards page.', count($proof_gates), 'antichrist-engine'),
                count($proof_gates)
            ),
            'actions' => array(
                __('Proof Home, Manifesto, About, Philosophy, Research, Recovery, AI Engine, Join, Journal, policies, and first posts in the rendered site.', 'antichrist-engine'),
                __('Use the Standards proof gates before outreach makes first impressions expensive to revise.', 'antichrist-engine'),
            ),
        ),
        array(
            'id'      => 'research-handoff',
            'label'   => __('Research and machine-route handoff', 'antichrist-engine'),
            'status'  => (count($download_routes) >= 6 && !empty($research_counts['claims'])) ? 'ready' : 'attention',
            'summary' => sprintf(
                /* translators: 1: claims count, 2: export route count. */
                __('%1$d claim dossiers and %2$d generated research-download routes are available.', 'antichrist-engine'),
                (int) ($research_counts['claims'] ?? 0),
                count($download_routes)
            ),
            'actions' => array(
                __('Spot-check the public REST routes, export links, and focused record URLs on the production domain.', 'antichrist-engine'),
                __('Use the provenance TXT export when handing research data to external reviewers or mirrors.', 'antichrist-engine'),
            ),
        ),
        array(
            'id'      => 'intake-handoff',
            'label'   => __('Private intake handoff', 'antichrist-engine'),
            'status'  => 'ready',
            'summary' => sprintf(
                /* translators: %d is the total number of private intake records. */
                _n('%d private intake record is ready for export.', '%d private intake records are ready for export.', (int) ($intake_summary['all']['count'] ?? 0), 'antichrist-engine'),
                (int) ($intake_summary['all']['count'] ?? 0)
            ),
            'actions' => array(
                __('Export all launch intake before migrating to newsletter, support, CRM, or program tooling.', 'antichrist-engine'),
                __('Confirm retention and response expectations before turning on higher-volume promotion.', 'antichrist-engine'),
            ),
        ),
        array(
            'id'      => 'support-and-external-services',
            'label'   => __('Support and external services', 'antichrist-engine'),
            'status'  => !empty($support_destination['is_live']) ? 'attention' : 'attention',
            'summary' => !empty($support_destination['is_live'])
                ? __('A live support URL is configured; external payment/support operations still need owner review.', 'antichrist-engine')
                : __('Support uses the contact fallback until external payment or donation tooling is intentionally connected.', 'antichrist-engine'),
            'actions' => array(
                __('Choose and configure privacy-aware analytics, newsletter/email deliverability, support/payment tooling, and consent posture if needed.', 'antichrist-engine'),
                __('Keep the roadmap open for hosting, WAF, backups, monitoring, Search Console, and external triage ownership.', 'antichrist-engine'),
            ),
        ),
        array(
            'id'      => 'release-package',
            'label'   => __('Release package discipline', 'antichrist-engine'),
            'status'  => 'attention',
            'summary' => __('Manual deploys should come from the repo build script so the WordPress theme zip and full-site package keep their expected shape.', 'antichrist-engine'),
            'actions' => array(
                __('Run scripts/build-deploy-zips.ps1 after final tests pass.', 'antichrist-engine'),
                __('Use E:\\antichristorg-Publish for WordPress theme upload and Releases\\ only for full-site server deployment.', 'antichrist-engine'),
            ),
        ),
    );
}

/**
 * Returns an admin-only URL for the launch handoff text export.
 *
 * @return string
 */
function antichrist_engine_foundation_get_launch_handoff_export_url()
{
    return wp_nonce_url(
        add_query_arg(
            array(
                'action' => 'antichrist_engine_export_launch_handoff',
            ),
            admin_url('admin-post.php')
        ),
        'antichrist_engine_export_launch_handoff'
    );
}

/**
 * Builds a plain-text go-live handoff packet for operators.
 *
 * @return string
 */
function antichrist_engine_foundation_get_launch_handoff_text()
{
    $visibility = antichrist_engine_foundation_get_launch_visibility_status();
    $checks = antichrist_engine_foundation_get_launch_readiness_checks();
    $summary = antichrist_engine_foundation_get_launch_readiness_summary($checks);
    $operations = antichrist_engine_foundation_get_launch_operations_checklist();
    $intake_summary = antichrist_engine_foundation_get_intake_operations_summary();
    $api_routes = antichrist_engine_foundation_get_research_api_route_map();
    $download_routes = antichrist_engine_foundation_get_research_export_download_route_map();
    $proof_gates = antichrist_engine_foundation_launch_proof_gates();
    $lines = array(
        'FFTAC launch handoff packet',
        'Generated: ' . gmdate(DATE_ATOM),
        'Site: ' . home_url('/'),
        'Launch visibility: ' . (string) ($visibility['mode'] ?? 'preview'),
        'WordPress search visibility: ' . (!empty($visibility['blog_public']) ? 'enabled' : 'discouraged'),
        'Eligible indexing allowed: ' . (!empty($visibility['allows_indexing']) ? 'yes' : 'no'),
        '',
        'Readiness summary:',
        '  Ready: ' . (int) ($summary['ready'] ?? 0),
        '  Needs attention: ' . (int) ($summary['attention'] ?? 0),
        '  Blocked: ' . (int) ($summary['blocked'] ?? 0),
        '',
        'Theme checks:',
    );

    foreach ($checks as $check) {
        $lines[] = '  - [' . strtoupper((string) ($check['status'] ?? 'attention')) . '] ' . (string) ($check['label'] ?? '');
        $lines[] = '    Summary: ' . (string) ($check['summary'] ?? '');
        $lines[] = '    Next: ' . (string) ($check['action'] ?? '');
    }

    $lines[] = '';
    $lines[] = 'Go-live operations checklist:';

    foreach ($operations as $item) {
        $lines[] = '  - [' . strtoupper((string) ($item['status'] ?? 'attention')) . '] ' . (string) ($item['label'] ?? '');
        $lines[] = '    Summary: ' . (string) ($item['summary'] ?? '');

        foreach ((array) ($item['actions'] ?? array()) as $action) {
            $lines[] = '    Action: ' . (string) $action;
        }
    }

    $lines[] = '';
    $lines[] = 'Final proof gates:';

    foreach ($proof_gates as $gate) {
        $target_url = antichrist_engine_foundation_build_target_url(
            (string) ($gate['target'] ?? ''),
            array(),
            (string) ($gate['anchor'] ?? '')
        );
        $lines[] = '  - ' . (string) ($gate['surface'] ?? $gate['title'] ?? '');
        $lines[] = '    Test: ' . (string) ($gate['test'] ?? '');
        $lines[] = '    Pass: ' . (string) ($gate['pass'] ?? '');
        $lines[] = '    Route: ' . $target_url;
    }

    $lines[] = '';
    $lines[] = 'Private intake exports:';

    foreach ($intake_summary as $source_key => $source) {
        $lines[] = '  - ' . (string) ($source['label'] ?? $source_key) . ': ' . (int) ($source['count'] ?? 0) . ' records';
        $lines[] = '    Export: ' . (string) ($source['export_url'] ?? '');
    }