Skip to content
wiki.fftac.org

Content Seed - Source Excerpt 01

Back to Content Seed

Summary

This source excerpt preserves a bounded section of 2IA.org/wp-content/themes/twoia-intelligence/inc/content-seed.php so readers can inspect the evidence without opening the full source file.

**Source path:** 2IA.org/wp-content/themes/twoia-intelligence/inc/content-seed.php

<?php
/**
 * Safe category and draft content seeding.
 *
 * @package TwoIA
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Required categories.
 *
 * @return array
 */
function twoia_required_categories() {
	return array(
		'Surveillance Architecture',
		'Keyword Monitoring',
		'Metadata and Identity',
		'AI and Sentiment Analysis',
		'Civil Liberties',
		'Ethical Information Operations',
		'Lawful Public Contact',
		'False Positives',
		'Systems and History',
		'Open-Source Intelligence',
		'Anonymous and Hacktivism',
		'Psychological Warfare',
		'Research Briefings',
		'Public Records and FOIA',
		'Public Records and Procurement',
		'AI, Risk, and Due Process',
		'AI and Due Process',
		'Data Brokers',
		'Biometric Identity',
		'Facial Recognition',
		'Location Data',
		'Protest Privacy',
		'Social Media Monitoring',
		'Watchlists and Flags',
		'Corrections and Redress',
		'OSINT Ethics',
		'Public Intelligence Boundaries',
		'Institutional Accountability',
		'Dossiers',
		'Toolkits',
		'Issue Hubs',
	);
}

/**
 * Create required categories without duplicates.
 */
function twoia_create_required_categories() {
	foreach ( twoia_required_categories() as $category_name ) {
		if ( ! term_exists( $category_name, 'category' ) ) {
			wp_insert_term(
				$category_name,
				'category',
				array(
					'slug' => sanitize_title( $category_name ),
				)
			);
		}
	}
}
add_action( 'after_switch_theme', 'twoia_create_required_categories' );
add_action( 'admin_init', 'twoia_create_required_categories' );

/**
 * Count all pages, including drafts.
 *
 * @return int
 */
function twoia_count_pages_all_statuses() {
	$count = wp_count_posts( 'page' );
	$total = 0;

	if ( $count ) {
		foreach ( get_object_vars( $count ) as $status_count ) {
			$total += absint( $status_count );
		}
	}

	return $total;
}

/**
 * Return required safe draft pages.
 *
 * @return array
 */
function twoia_seed_pages() {
	$disclaimer = '<p><strong>Civic standard:</strong> 2IA is an independent public-intelligence research project for human freedom, public records, privacy, due process, anonymity, correction, and accountable power. Use these drafts to make systems legible, not to target private people or misuse infrastructure.</p>';

	if ( function_exists( 'twoia_virtual_pages' ) ) {
		$seed_pages = array(
			'Home' => '<p>One identity is given. One identity is chosen. Anonymous is the space between.</p><p>Use this draft as the static homepage, or let the front-page.php template render the full 2IA landing page.</p>' . $disclaimer,
		);

		foreach ( twoia_virtual_pages() as $page ) {
			$content  = '<p>' . esc_html( $page['summary'] ) . '</p>';
			$content .= '<div class="wp-block-group">';

			foreach ( $page['sections'] as $section ) {
				$content .= '<h2>' . esc_html( $section['title'] ) . '</h2>';
				$content .= '<p>' . esc_html( $section['body'] ) . '</p>';
			}

			$content .= '</div>';
			$content .= $disclaimer;

			$seed_pages[ wp_strip_all_tags( $page['title'] ) ] = $content;
		}

		return $seed_pages;
	}

	return array(
		'Home' => '<p>One identity is given. One identity is chosen. Anonymous is the space between.</p><p>Use this draft as the static homepage, or let the front-page.php template render the full 2IA landing page.</p>' . $disclaimer,
		'What They Look For' => '<p>Modern surveillance and compliance systems may evaluate selectors, metadata, behavior patterns, social graphs, sentiment, public posts, provider records, and contextual signals. This page explains those categories at a high level for public understanding.</p><p>The editorial purpose is literacy, accountability, and civil-liberties discussion, not operational triggering or evasion.</p>' . $disclaimer,
		'Why They Look' => '<p>Governments and regulated organizations often describe monitoring in terms of security, fraud prevention, national defense, child protection, infrastructure protection, and public safety. Civil-liberties analysis asks whether monitoring is lawful, necessary, proportionate, auditable, and constrained.</p><p>A democratic account must hold both concerns in view: real harms exist, and overbroad surveillance can chill lawful speech and association.</p>' . $disclaimer,
		'Two Identities' => '<p>The given identity is the record-bound self: name, documents, account history, device traces, location, payment patterns, and public reputation. The chosen identity is the expressive self: pseudonym, avatar, creative voice, community role, private belief, and protective boundary.</p><p>The anonymous space is the contested area between identity, privacy, surveillance, safety, and autonomy.</p>' . $disclaimer,
		'Surveillance Systems' => '<p>This draft introduces a non-operational history of communications surveillance: early packet filters, lawful intercept systems, provider-held cloud data, public-source monitoring, and AI-assisted analysis. It avoids technical instructions, exploit methods, or system-testing guidance.</p>' . $disclaimer,
		'Open-Source Intelligence' => '<p>Open-source intelligence turns publicly available material into accountable analysis. Responsible OSINT starts with a lawful purpose, collects only what is relevant, preserves source context, separates facts from inference, and protects people through minimization, redaction, retention limits, and correction paths.</p><p>It explains OSINT as privacy-aware public verification, not as a reconnaissance playbook.</p>' . $disclaimer,
		'Anonymous Hacktivist Collective' => '<p>Anonymous is best understood as a loose hacktivist banner, culture, and claim of collective identity rather than a stable organization. Its history helps explain anonymity, attribution uncertainty, symbolic protest, splintering, and accountability risk.</p><p>It studies hacktivism without teaching attack methods, target selection, data leaks, doxxing, disruption tactics, evasion, or unlawful participation.</p>' . $disclaimer,
		'Psychological Warfare' => '<p>Psychological warfare uses narrative, emotion, uncertainty, repetition, and social pressure to shape perception. 2IA frames the subject as media literacy, civil-liberties accountability, and public resilience.</p><p>It explains propaganda, misinformation, disinformation, synthetic media, amplification, provenance, and correction paths while avoiding persuasion targeting, deception scripts, intimidation tactics, bot coordination, astroturfing methods, microtargeting workflows, or coercive influence guidance.</p>' . $disclaimer,
		'Metadata Is Identity' => '<p>Metadata can reveal who communicated, when, from where, with which device, through which service, and in what pattern. Even without message content, repeated relational signals can form a durable identity graph.</p><p>It helps readers understand why metadata deserves civil-liberties scrutiny.</p>' . $disclaimer,
		'AI Surveillance' => '<p>AI-assisted monitoring may classify language, infer sentiment, cluster relationships, summarize behavior, rank risk, and surface anomalies. These systems can help triage scale, but they can also amplify bias, context loss, and false confidence.</p><p>2IA frames AI surveillance as a governance and accountability question.</p>' . $disclaimer,
		'Keyword Monitoring' => '<p>Keyword monitoring is an older and still common approach to sorting communications and public-source material. The explanation focuses on why static terms produce false positives, why context matters, and why publication of operational trigger lists can be reckless.</p>' . $disclaimer,
		'False Positives' => '<p>Innocent speech can be misread because of jokes, slang, quotes, journalism, fiction, political debate, research, translation, reused symbols, and algorithmic overreach. False positives are not rare edge cases; they are a predictable result of scale and context loss.</p>' . $disclaimer,
		'Ethics and Civil Liberties' => '<p>Ethical information practice centers necessity, proportionality, transparency, oversight, human rights, civilian protections, privacy, free expression, accountability, and harm minimization. 2IA rejects coercive manipulation, harassment, impersonation, and disinformation.</p>' . $disclaimer,
		'Lawful Contact' => '<p>Use official public channels, published contact forms, regular email addresses, public comment processes, and lawful records-request systems for their intended purpose. Be truthful, brief, and respectful. Do not automate mass outreach, send unsolicited attachments, scan, probe, ping, stress-test, or attempt to interact with monitoring infrastructure.</p><p>FOIA and public-records systems are for records requests, not casual greetings.</p>' . $disclaimer,
		'Research' => '<p>This page can collect investigations, case studies, historical analysis, policy research, public-records work, intelligence-apparatus research, toolkits, corrections, and updates.</p>' . $disclaimer,