Foundation - Source Excerpt 13
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
'path' => 'assets/downloads/previews/fftac-triune-spiral-poster-preview.png',
'alt' => __('FFTAC texts lab social preview', 'antichrist-engine'),
),
);
$selected = (array) ($assets[(string) $page_key] ?? $default);
$relative_path = ltrim((string) ($selected['path'] ?? $default['path']), '/\\');
$asset = antichrist_engine_foundation_resolve_asset($relative_path);
if (!$asset['exists']) {
$selected = $default;
$relative_path = ltrim((string) $default['path'], '/\\');
$asset = antichrist_engine_foundation_resolve_asset($relative_path);
}
if (!$asset['exists']) {
$selected = $fallback;
$relative_path = ltrim((string) $fallback['path'], '/\\');
$asset = antichrist_engine_foundation_resolve_asset($relative_path);
}
$image = array(
'url' => (string) ($asset['url'] ?? trailingslashit(get_template_directory_uri()) . str_replace('\\', '/', $relative_path)),
'alt' => (string) ($selected['alt'] ?? $fallback['alt']),
);
if (!empty($asset['exists'])) {
$dimensions = @getimagesize((string) $asset['path']);
if (is_array($dimensions)) {
$image['width'] = (string) ((int) ($dimensions[0] ?? 0));
$image['height'] = (string) ((int) ($dimensions[1] ?? 0));
if (!empty($dimensions['mime'])) {
$image['type'] = (string) $dimensions['mime'];
}
}
}
return $image;
}
/**
* Returns page-specific structured data graphs for foundation pages.
*
* @param string $page_key Foundation page key.
* @param string $current_url Current request URL.
* @param string $webpage_id Current WebPage graph ID.
* @param string $website_id Site-wide WebSite graph ID.
* @param string $organization_id Site-wide Organization graph ID.
* @param string $description Normalized page description.
* @return array<int, array<string, mixed>>
*/
function antichrist_engine_foundation_get_page_structured_data_graphs($page_key, $current_url, $webpage_id, $website_id, $organization_id, $description)
{
$graphs = array();
$page_key = (string) $page_key;
if ('questions' === $page_key) {
$main_entities = array();
foreach (antichrist_engine_foundation_questions_faqs() as $faq) {
$question = trim((string) ($faq['question'] ?? ''));
$answer = trim((string) ($faq['answer'] ?? ''));
if ('' === $question || '' === $answer) {
continue;
}
$main_entities[] = array(
'@type' => 'Question',
'name' => $question,
'acceptedAnswer' => array(
'@type' => 'Answer',
'text' => $answer,
),
);
}
if ($main_entities) {
$graphs[] = array(
'@type' => 'FAQPage',
'@id' => $current_url . '#faq',
'url' => $current_url,
'name' => wp_get_document_title(),
'description' => $description,
'isPartOf' => array('@id' => $website_id),
'publisher' => array('@id' => $organization_id),
'mainEntity' => $main_entities,
);
}
}
if ('review_notices' === $page_key) {
$item_list = antichrist_engine_foundation_build_item_list_graph(
$current_url . '#review-notices',
__('FFTAC review notice register', 'antichrist-engine'),
__('Baseline registrations, queued amendment thresholds, and staged governance reviews for the public record.', 'antichrist-engine'),
antichrist_engine_foundation_get_review_notice_register(),
$current_url,
$website_id,
$organization_id
);
if ($item_list) {
$graphs[] = $item_list;
}
}
if ('contact' === $page_key) {
$contact_items = array();
foreach (antichrist_engine_foundation_contact_channels() as $slug => $channel) {
$contact_items[] = array(
'title' => (string) ($channel['title'] ?? $channel['label'] ?? $slug),
'summary' => (string) ($channel['summary'] ?? ''),
'url' => add_query_arg('route', $slug, antichrist_engine_foundation_get_page_url('contact')) . '#contact-desk',
'meta' => (string) ($channel['response_note'] ?? ''),
);
}
$item_list = antichrist_engine_foundation_build_item_list_graph(
$current_url . '#contact-routes',
__('FFTAC contact routes', 'antichrist-engine'),
__('Structured public correspondence routes for editorial questions, research corrections, media requests, recovery orientation, and technical access issues.', 'antichrist-engine'),
$contact_items,
$current_url,
$website_id,
$organization_id
);
if ($item_list) {
$graphs[] = $item_list;
}
}
if ('support' === $page_key) {
$support_destination = antichrist_engine_foundation_get_support_destination();
$support_items = array();
foreach (antichrist_engine_foundation_support_paths() as $path) {
$route = (string) ($path['route'] ?? '');
$url = '';
if ('support_destination' === $route) {
$url = (string) ($support_destination['url'] ?? '');
} elseif ('' !== $route) {
$url = antichrist_engine_foundation_build_target_url(
$route,
(array) ($path['args'] ?? array()),
(string) ($path['anchor'] ?? '')
);
}
$support_items[] = array(
'title' => (string) ($path['title'] ?? ''),
'summary' => (string) ($path['summary'] ?? ''),
'url' => $url,
'meta' => (string) ($path['eyebrow'] ?? ''),
);
}
$item_list = antichrist_engine_foundation_build_item_list_graph(
$current_url . '#support-lanes',
__('FFTAC support lanes', 'antichrist-engine'),
__('Public contribution paths for launch funding, sustaining backing, underwriting conversations, and pre-giving review of the public record.', 'antichrist-engine'),
$support_items,
$current_url,
$website_id,
$organization_id
);
if ($item_list) {
$graphs[] = $item_list;
}
if (!empty($support_destination['url'])) {
$graphs[] = array(
'@type' => 'DonateAction',
'@id' => $current_url . '#donate',
'name' => __('Support the FFTAC public record', 'antichrist-engine'),
'description' => __('Route material support toward hosting resilience, publication rhythm, research buildout, and recovery-facing infrastructure.', 'antichrist-engine'),
'target' => array(
'@type' => 'EntryPoint',
'urlTemplate' => (string) $support_destination['url'],
),
'agent' => array('@id' => $website_id),
'recipient' => array('@id' => $organization_id),
);
}
}
if ('join' === $page_key) {
$program_items = array();
foreach (antichrist_engine_foundation_program_blueprints() as $slug => $program) {
$program_items[] = array(
'title' => (string) ($program['label'] ?? $slug),
'summary' => (string) ($program['description'] ?? $program['summary'] ?? ''),
'url' => antichrist_engine_foundation_build_target_url('join', array('program' => $slug), 'program-intake'),
'meta' => implode(' / ', array_filter(array(
(string) ($program['format'] ?? ''),
(string) ($program['cadence'] ?? ''),
))),
);
}
$item_list = antichrist_engine_foundation_build_item_list_graph(
$current_url . '#programs',
__('FFTAC participation programs', 'antichrist-engine'),
__('Cohort, summit, verified-research, and academic-affiliate intake lanes that route readers into slower participation without collapsing into generic membership theater.', 'antichrist-engine'),
$program_items,
$current_url,
$website_id,