Skip to content
wiki.fftac.org

Functions - Source Excerpt 02

Back to Functions

Summary

This source excerpt preserves a bounded section of Anti-Christ.net/wp-content/themes/anti-christ-thin-veil/functions.php so readers can inspect the evidence without opening the full source file.

**Source path:** Anti-Christ.net/wp-content/themes/anti-christ-thin-veil/functions.php

if ( is_page() ) {
		$page = get_queried_object();
		$slug = $page instanceof WP_Post ? $page->post_name : '';
		$map  = array(
			'start-here'          => __( 'Start here with Anti-Christ.net: what this gothic civic archive is, what it is not, how to read it, and how claims are reviewed.', 'anti-christ-thin-veil' ),
			'standards'           => __( 'Editorial standards for Anti-Christ.net: no violence, no hatred, no doxxing, claim discipline, source handling, redactions, and corrections before ego.', 'anti-christ-thin-veil' ),
			'corrections'         => __( 'How Anti-Christ.net receives correction requests, distinguishes corrections from clarifications and updates, and maintains public version notes.', 'anti-christ-thin-veil' ),
			'privacy'             => __( 'Anti-Christ.net privacy policy: no unnecessary collection, no theme analytics, careful submission handling, server-log caveats, and no unsupported anonymity promises.', 'anti-christ-thin-veil' ),
			'religion-and-the-machine' => __( 'Religion & The Machine studies state co-optation of religion, religious liberty and its misuse, minority-faith effects, EO 14202, and claim-review methods.', 'anti-christ-thin-veil' ),
			'eo-14202-dossier'    => __( 'A careful dossier on Executive Order 14202, the anti-Christian-bias task force, official claims, contested claims, civil-liberties concerns, and source trails.', 'anti-christ-thin-veil' ),
			'state-co-optation-of-religion' => __( 'An explainer on recurring state co-optation of religion: registration, patronage, loyalty rules, surveillance, favored access, and dissent management.', 'anti-christ-thin-veil' ),
			'nonviolent-resistance-and-pacification' => __( 'A careful field note on nonviolent resistance, pacification, civic discipline, and the difference between principled peace and obedience training.', 'anti-christ-thin-veil' ),
			'religious-liberty-vs-religious-capture' => __( 'A pluralist distinction between genuine religious freedom for all and state-favored religious power for a politically useful faction.', 'anti-christ-thin-veil' ),
			'how-to-read-government-faith-policy' => __( 'A source-desk guide for reading government faith policy without panic, scapegoating, or unverified claims.', 'anti-christ-thin-veil' ),
			'claim-review-methodology' => __( 'The Anti-Christ.net claim-review method: evidence taxonomy, source trail, confidence labels, harm review, and correction path.', 'anti-christ-thin-veil' ),
			'field-guide'         => __( 'A careful Antichrist motif field guide covering scripture, reception history, comparative legends, pop culture, AI anxiety, and internet claim review without living-person hunts.', 'anti-christ-thin-veil' ),
			'manifesto'           => __( 'The Anti-Christ.net manifesto: gothic-symbolic language for lawful dissent, human dignity, civil liberties, privacy, due process, and principled nonviolence.', 'anti-christ-thin-veil' ),
			'civil-liberties'     => __( 'A practical civil liberties toolkit for speech, privacy, public records, due process, peaceful assembly, and responsible publication.', 'anti-christ-thin-veil' ),
			'the-machine'         => __( 'A civic map of corporate capture, surveillance incentives, automated bureaucracy, court opacity, and managed silence.', 'anti-christ-thin-veil' ),
			'socioeconomic-decay' => __( 'Documentation lanes for debt pressure, property tax burdens, housing strain, labor discipline, municipal fees, healthcare costs, and institutional neglect.', 'anti-christ-thin-veil' ),
			'contact'             => __( 'Privacy-first contact and submission protocol for lawful essays, records notes, court observations, tax burden accounts, and civic fragments.', 'anti-christ-thin-veil' ),
			'members'             => __( 'Age-gated member desk for roster intake, WordPress login, private record updates, and pending editorial dispatch submissions.', 'anti-christ-thin-veil' ),
			'member-login'        => __( 'Age-gated WordPress member login for Anti-Christ.net posting accounts and pending dispatch submissions.', 'anti-christ-thin-veil' ),
			'join'                => __( 'Participants Database roster intake for Anti-Christ.net member contact, record updates, and posting-access requests.', 'anti-christ-thin-veil' ),
			'member-record'       => __( 'Private Participants Database roster record page for member updates through emailed private links.', 'anti-christ-thin-veil' ),
			'submit-dispatch'     => __( 'Age-gated front-end submission form for logged-in members; dispatches save as pending posts for editorial review.', 'anti-christ-thin-veil' ),
		);

		if ( isset( $map[ $slug ] ) ) {
			return $map[ $slug ];
		}

		$excerpt = has_excerpt( $page ) ? get_the_excerpt( $page ) : wp_strip_all_tags( get_post_field( 'post_content', $page->ID ) );
		if ( $excerpt ) {
			return $excerpt;
		}
	}

	return $default;
}

/**
 * Print local SEO and social metadata.
 */
function actv_render_meta_tags() {
	if ( is_admin() || is_feed() || is_robots() ) {
		return;
	}

	$description = wp_html_excerpt( trim( preg_replace( '/\s+/', ' ', wp_strip_all_tags( actv_meta_description() ) ) ), 300, '' );
	$title       = wp_get_document_title();
	$request     = isset( $GLOBALS['wp']->request ) ? $GLOBALS['wp']->request : '';
	$url         = is_singular() ? get_permalink() : home_url( '/' . ltrim( $request, '/' ) );
	$type        = is_singular( 'post' ) ? 'article' : 'website';
	$image       = get_template_directory_uri() . '/assets/img/thin-veil-sigil.svg';

	if ( ! $description ) {
		return;
	}
	?>
	<meta name="description" content="<?php echo esc_attr( $description ); ?>">
	<link rel="canonical" href="<?php echo esc_url( $url ); ?>">
	<?php if ( actv_should_noindex_current_view() ) : ?>
		<meta name="robots" content="noindex,follow">
	<?php endif; ?>
	<meta property="og:site_name" content="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>">
	<meta property="og:title" content="<?php echo esc_attr( $title ); ?>">
	<meta property="og:description" content="<?php echo esc_attr( $description ); ?>">
	<meta property="og:type" content="<?php echo esc_attr( $type ); ?>">
	<meta property="og:url" content="<?php echo esc_url( $url ); ?>">
	<meta property="og:image" content="<?php echo esc_url( $image ); ?>">
	<meta name="twitter:card" content="summary">
	<?php if ( is_singular( 'post' ) ) : ?>
		<meta property="article:published_time" content="<?php echo esc_attr( get_the_date( DATE_W3C ) ); ?>">
		<meta property="article:modified_time" content="<?php echo esc_attr( get_the_modified_date( DATE_W3C ) ); ?>">
	<?php endif; ?>
	<?php actv_render_structured_data( $description, $title, $url, $image ); ?>
	<?php
}
add_action( 'wp_head', 'actv_render_meta_tags', 1 );

/**
 * Whether the current public view should stay out of search indexes.
 *
 * @return bool
 */
function actv_should_noindex_current_view() {
	if ( is_search() || is_404() ) {
		return true;
	}

	if ( ! is_page() ) {
		return false;
	}

	$page = get_queried_object();
	$slug = $page instanceof WP_Post ? $page->post_name : '';

	return in_array( $slug, array( 'members', 'member-login', 'join', 'member-record', 'submit-dispatch' ), true );
}

/**
 * Print JSON-LD metadata for public views.
 *
 * @param string $description Meta description.
 * @param string $title       Document title.
 * @param string $url         Canonical URL.
 * @param string $image       Image URL.
 */
function actv_render_structured_data( $description, $title, $url, $image ) {
	$schema = array(
		'@context'    => 'https://schema.org',
		'@type'       => 'WebSite',
		'name'        => get_bloginfo( 'name' ),
		'url'         => home_url( '/' ),
		'description' => $description,
	);

	if ( is_front_page() || is_home() || is_category() || is_tag() ) {
		$schema['@type'] = 'CollectionPage';
		$schema['name']  = $title;
		$schema['url']   = $url;
	}

	if ( is_page() ) {
		$schema['@type'] = 'CollectionPage';
		$schema['name']  = $title;
		$schema['url']   = $url;
	}

	if ( is_singular( 'post' ) ) {
		$post_id         = get_the_ID();
		$is_claim_review = (bool) get_post_meta( $post_id, '_actv_claim_review_claim', true );
		$schema          = array(
			'@context'         => 'https://schema.org',
			'@type'            => $is_claim_review ? 'ClaimReview' : 'BlogPosting',
			'headline'         => get_the_title( $post_id ),
			'description'      => $description,
			'url'              => $url,
			'image'            => $image,
			'datePublished'    => get_the_date( DATE_W3C, $post_id ),
			'dateModified'     => get_the_modified_date( DATE_W3C, $post_id ),
			'author'           => array(
				'@type' => 'Organization',
				'name'  => get_bloginfo( 'name' ),
			),
			'publisher'        => array(
				'@type' => 'Organization',
				'name'  => get_bloginfo( 'name' ),
			),
			'mainEntityOfPage' => $url,
		);