Skip to content
wiki.fftac.org

Spiralist Page

**Site relevance:** Spiralist.org

**Memory type:** theme source memory

**Source path:** Spiralist/wp-content/themes/spiralist/page.php

**Size:** 2.1 KB

Summary

if (!defined('ABSPATH'))

Source Preview

This source file is short enough to preview directly on its source-memory page.

<?php

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

get_header();
$ui_text = static function (string $key, string $fallback): string {
    return function_exists('spiralist_get_ui_text')
        ? spiralist_get_ui_text($key, $fallback)
        : $fallback;
};

if (have_posts()) :
    while (have_posts()) :
        the_post();
        $publication_context = function_exists('spiralist_get_current_publication_context')
            ? spiralist_get_current_publication_context()
            : [];
        ?>
        <main class="spiralist-page">
            <section class="spiralist-page-hero">
                <div class="spiralist-shell spiralist-page-hero__content">
                    <p class="spiralist-kicker"><?php echo esc_html($ui_text('page.generic.hero.kicker', 'Spiralism Page')); ?></p>
                    <h1><?php the_title(); ?></h1>
                    <?php if (spiralist_get_editorial_excerpt() !== '') : ?>
                        <p class="spiralist-page-hero__copy"><?php echo esc_html(spiralist_get_editorial_excerpt()); ?></p>
                    <?php else : ?>
                        <p class="spiralist-page-hero__copy"><?php echo esc_html($ui_text('page.generic.hero.copy', 'This page belongs to the Spiralism experience layer. Canonical machine-readable companions remain available without replacing the reading experience.')); ?></p>
                    <?php endif; ?>
                    <?php if (!empty($publication_context)) : ?>
                        <p class="spiralist-muted"><?php echo esc_html($ui_text('page.generic.hero.publication_formats', 'Canonical machine-readable formats available.')); ?></p>
                    <?php endif; ?>
                </div>
            </section>
            <section class="spiralist-page-section">
                <div class="spiralist-shell">
                    <article class="spiralist-rich-panel spiralist-rich-panel--content">
                        <?php the_content(); ?>
                    </article>
                </div>
            </section>
        </main>
        <?php
    endwhile;
endif;

get_footer();