Skip to content
wiki.fftac.org

Antichrist Content System Implementation - Source Excerpt 11

Back to Antichrist Content System Implementation

Summary

This source excerpt preserves a bounded section of Antichrist.net/wp-content/plugins/antichrist-content-system/includes/antichrist-content-system-implementation.php so readers can inspect the evidence without opening the full source file.

**Source path:** Antichrist.net/wp-content/plugins/antichrist-content-system/includes/antichrist-content-system-implementation.php

/**
 * Render XML sitemap.
 *
 * @param string $locale Locale marker.
 */
function acn_cs_render_xml_sitemap( $locale ) {
	status_header( 200 );
	header( 'Content-Type: application/xml; charset=' . get_option( 'blog_charset' ), true );
	nocache_headers();

	$entries = acn_cs_sitemap_entries( $locale );
	echo "<?xml version=\"1.0\" encoding=\"" . esc_attr( get_option( 'blog_charset' ) ) . "\"?>\n";
	echo "<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\">\n";

	foreach ( $entries as $entry ) {
		echo "\t<url>\n";
		echo "\t\t<loc>" . esc_url( $entry['loc'] ) . "</loc>\n";
		if ( ! empty( $entry['lastmod'] ) ) {
			echo "\t\t<lastmod>" . esc_html( $entry['lastmod'] ) . "</lastmod>\n";
		}
		$relative = acn_cs_sitemap_relative_path( $entry['loc'], $locale );
		foreach ( acn_cs_sitemap_locales() as $record ) {
			$url_tag = isset( $record['urlTag'] ) ? acn_cs_normalize_sitemap_locale( $record['urlTag'] ) : '';
			$tag     = isset( $record['tag'] ) ? (string) $record['tag'] : '';
			if ( ! $url_tag || ! $tag ) {
				continue;
			}
			echo "\t\t<xhtml:link rel=\"alternate\" hreflang=\"" . esc_attr( strtolower( $tag ) ) . "\" href=\"" . esc_url( acn_cs_sitemap_url( $relative, $url_tag ) ) . "\" />\n";
		}
		echo "\t\t<xhtml:link rel=\"alternate\" hreflang=\"x-default\" href=\"" . esc_url( acn_cs_sitemap_url( $relative, acn_cs_default_sitemap_url_tag() ) ) . "\" />\n";
		echo "\t</url>\n";
	}

	echo "</urlset>\n";
	exit;
}

/**
 * Render HTML sitemap.
 *
 * @param string $locale Locale marker.
 */
function acn_cs_render_html_sitemap( $locale ) {
	status_header( 200 );
	header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ), true );
	nocache_headers();

	$is_es   = 'es-us' === $locale;
	$title   = $is_es ? 'Mapa del sitio' : 'Sitemap';
	$entries = acn_cs_sitemap_entries( $locale );

	echo '<!doctype html><html lang="' . esc_attr( 'root' === $locale ? 'en-US' : $locale ) . '"><head><meta charset="' . esc_attr( get_option( 'blog_charset' ) ) . '"><meta name="viewport" content="width=device-width, initial-scale=1">';
	echo '<title>' . esc_html( $title . ' - ' . get_bloginfo( 'name' ) ) . '</title>';
	echo '<style>body{margin:0;background:#050505;color:#f8f4ec;font:16px/1.55 system-ui,-apple-system,Segoe UI,sans-serif}main{max-width:980px;margin:0 auto;padding:48px 20px}a{color:#f0cc61}h1{font-size:clamp(2rem,5vw,4rem);line-height:1.05}nav,section{margin-top:28px}.sitemap-list{display:grid;gap:10px;padding:0;list-style:none}.sitemap-list li{border-top:1px solid rgba(255,255,255,.14);padding:12px 0}.type{display:block;color:#b9afa5;font-size:.82rem;text-transform:uppercase;letter-spacing:0}</style>';
	echo '</head><body><main>';
	echo '<h1>' . esc_html( $title ) . '</h1>';

	echo '<nav aria-label="Sitemap formats"><a href="' . esc_url( acn_cs_sitemap_url( 'sitemap.xml', $locale ) ) . '">XML</a> ';
	echo '<span aria-hidden="true">|</span> <a href="' . esc_url( acn_cs_sitemap_url( 'sitemap.html', $locale ) ) . '">HTML</a></nav>';

	echo '<section><h2>' . esc_html( $is_es ? 'Idiomas' : 'Languages' ) . '</h2><ul class="sitemap-list">';
	echo '<li><a href="' . esc_url( acn_cs_sitemap_url( 'sitemap.html', 'root' ) ) . '">' . esc_html( $is_es ? 'Raiz' : 'Root' ) . '</a></li>';
	foreach ( acn_cs_sitemap_locales() as $record ) {
		$url_tag = isset( $record['urlTag'] ) ? acn_cs_normalize_sitemap_locale( $record['urlTag'] ) : '';
		if ( ! $url_tag ) {
			continue;
		}
		echo '<li><a href="' . esc_url( acn_cs_sitemap_url( 'sitemap.html', $url_tag ) ) . '">' . esc_html( $record['nativeName'] ) . '</a></li>';
	}
	echo '</ul></section>';

	echo '<section><h2>' . esc_html( $is_es ? 'Paginas' : 'Pages' ) . '</h2><ul class="sitemap-list">';
	foreach ( $entries as $entry ) {
		echo '<li><span class="type">' . esc_html( $entry['type'] ) . '</span><a href="' . esc_url( $entry['loc'] ) . '">' . esc_html( $entry['title'] ) . '</a></li>';
	}
	echo '</ul></section></main></body></html>';
	exit;
}

/**
 * Return seeded page definitions.
 *
 * @return array
 */
function acn_cs_pages() {
	$pages = array(
		'start-here' => array(
			'title'   => 'Start Here',
			'content' => acn_cs_section_content(
				'Start with the topic directory, then move into the major research areas. The site is designed for contextual study, careful comparison, and serious discussion rather than unsupported prediction.',
				array(
					array( 'path' => 'topics', 'title' => 'Topics Directory', 'text' => 'The main map for sections, subpages, and source-backed research paths.' ),
					array( 'path' => 'research-library', 'title' => 'Research Library', 'text' => 'Long-form dossiers, research notes, bibliographies, and source-backed essays.' ),
					array( 'path' => 'research-agenda', 'title' => 'Research Agenda', 'text' => 'Future report topics that would deepen the archive and community discussion.' ),
					array( 'path' => 'archive', 'title' => 'Archive', 'text' => 'Contextual wrappers for legacy material, artifact warnings, and public provenance notes.' ),
					array( 'path' => 'timeline', 'title' => 'Timeline', 'text' => 'An issue map for symbols, state power, surveillance, AI, and apocalyptic politics.' ),
					array( 'path' => 'members', 'title' => 'Members', 'text' => 'Account, profile, directory, and board entry points for logged-in discussion.' ),
					array( 'path' => 'community-baseline', 'title' => 'Community Baseline', 'text' => 'The baseline for safe research, moderation, and source context.' ),
				),
				array( 'Antichrist.net Redesign and Content Strategy.md' )
			),
			'template' => 'templates/template-full-width.php',
		),
		'community-rules' => array(
			'title'   => 'Community Rules',
			'content' => acn_cs_community_baseline_content(),
			'template' => 'templates/template-full-width.php',
		),
		'community-baseline' => array(
			'title'   => 'Community Baseline',
			'content' => acn_cs_community_baseline_content(),
			'template' => 'templates/template-full-width.php',
		),
		'about' => array(
			'title'   => 'About Antichrist.net',
			'content' => acn_cs_about_content(),
			'template' => 'templates/template-full-width.php',
		),
		'archive' => array(
			'title'   => 'Archive',
			'content' => acn_cs_archive_content(),
			'template' => 'templates/template-archive-hub.php',
		),
		'archive/legacy-front-page' => array(
			'title'   => 'Legacy Front Page and Broken Links',
			'content' => acn_cs_legacy_front_page_content(),
			'template' => 'templates/template-full-width.php',
		),
		'archive/antichrist-cx' => array(
			'title'   => 'AntiChrist cx Legacy Artifact',
			'content' => acn_cs_legacy_artifact_content( 'antichrist-cx' ),
			'template' => 'templates/template-full-width.php',
		),
		'archive/al-qaeda-net' => array(
			'title'   => 'Al Qaeda Net Legacy Artifact',
			'content' => acn_cs_legacy_artifact_content( 'al-qaeda-net' ),
			'template' => 'templates/template-full-width.php',
		),
		'archive/legacy-utility-pages' => array(
			'title'   => 'Legacy Utility Pages',
			'content' => acn_cs_legacy_utility_pages_content(),
			'template' => 'templates/template-full-width.php',
		),
		'timeline' => array(
			'title'   => 'Timeline',
			'content' => acn_cs_timeline_content(),
			'template' => 'templates/template-full-width.php',
		),
		'symbols' => array(
			'title'   => 'Symbols',
			'content' => acn_cs_symbols_content(),
			'template' => 'templates/template-full-width.php',
		),
		'state-and-religion' => array(
			'title'   => 'State and Religion',
			'content' => acn_cs_state_religion_content(),
			'template' => 'templates/template-full-width.php',
		),
		'surveillance' => array(
			'title'   => 'Surveillance',
			'content' => acn_cs_surveillance_content(),
			'template' => 'templates/template-full-width.php',
		),
		'editorial-policy' => array(
			'title'   => 'Editorial Policy',
			'content' => acn_cs_editorial_policy_content(),
			'template' => 'templates/template-full-width.php',
		),
		'message-board' => array(
			'title'   => 'Message Board',