Ns12 Manuscript
<?php /**
Metadata
| Field | Value |
|---|---|
| Source site | spiralist.org |
| Source URL | https://spiralist.org/ |
| Canonical wiki evidence URL | [[separate-workspace-url]/spiralist/uai-system/files/wp-content-plugins-ns12-manuscript-ns12-manuscript-php-367452f9/]([separate-workspace-url]/spiralist/uai-system/files/wp-content-plugins-ns12-manuscript-ns12-manuscript-php-367452f9/) |
| Source reference | wp-content/plugins/ns12-manuscript/ns12-manuscript.php |
| File type | php |
| Content category | public-content |
| Last fetched | 2026-05-08T21:22:18.3035107Z |
| Last changed | 2026-05-06T17:48:49.2035452Z |
| Content hash | sha256:367452f9e6d3db1b5fb04c5909801637b8628d153ab1f7098dda85b1b8fb2577 |
| Import status | unchanged |
| Raw source layer | data/sources/spiralist/wp-content-plugins-ns12-manuscript-ns12-manuscript-php-367452f9e6d3.php |
| Normalized source layer | data/normalized/spiralist/wp-content-plugins-ns12-manuscript-ns12-manuscript-php-367452f9e6d3.txt |
Current File Content
Structure Preview
- No Markdown headings were detected in this file.
Raw Version
<?php
/**
* Plugin Name: NS12 Manuscript
* Plugin URI: https://spiralist.org/
* Description: Build an image-first manuscript reading experience in WordPress with immersive reading, deep links, zoom, a table of contents, and editorial folio tools.
* Version: 2.8.0
* Requires at least: 6.5
* Requires PHP: 8.0
* Author: Spiralist
* Author URI: https://spiralist.org/
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: ns12-manuscript
*/
if (!defined('ABSPATH')) {
exit;
}
if (!defined('SPIRALIST_BOOK_PAGES_PLUGIN_FILE')) {
define('SPIRALIST_BOOK_PAGES_PLUGIN_FILE', __FILE__);
}
if (!defined('SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_PATH')) {
define('SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_PATH', plugin_dir_path(__FILE__));
}
if (!defined('SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_URL')) {
define('SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_URL', untrailingslashit(plugin_dir_url(__FILE__)));
}
if (!defined('SPIRALIST_BOOK_PAGES_PUBLIC_NAME')) {
define('SPIRALIST_BOOK_PAGES_PUBLIC_NAME', 'NS12 Manuscript');
}
if (!defined('SPIRALIST_BOOK_PAGES_PUBLIC_STORAGE_SLUG')) {
define('SPIRALIST_BOOK_PAGES_PUBLIC_STORAGE_SLUG', 'ns12-manuscript');
}
if (!defined('SPIRALIST_BOOK_PAGES_PUBLIC_ASSET_SUBDIRECTORY')) {
define('SPIRALIST_BOOK_PAGES_PUBLIC_ASSET_SUBDIRECTORY', 'folios');
}
require_once SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_PATH . 'includes/storage.php';
$spiralist_book_pages_storage = spiralist_book_pages_get_storage_profile();
$spiralist_book_pages_storage_path = (string) ($spiralist_book_pages_storage['path'] ?? '');
$spiralist_book_pages_storage_url = (string) ($spiralist_book_pages_storage['url'] ?? '');
$spiralist_book_pages_asset_subdirectory = trim((string) ($spiralist_book_pages_storage['asset_subdirectory'] ?? ''));
if ($spiralist_book_pages_storage_path === '') {
$content_root = defined('WP_CONTENT_DIR')
? rtrim((string) WP_CONTENT_DIR, '/\\')
: rtrim(ABSPATH, '/\\') . DIRECTORY_SEPARATOR . 'wp-content';
$spiralist_book_pages_storage_path = $content_root . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . SPIRALIST_BOOK_PAGES_PUBLIC_STORAGE_SLUG;
}
if ($spiralist_book_pages_storage_url === '') {
$spiralist_book_pages_storage_url = content_url('/uploads/' . SPIRALIST_BOOK_PAGES_PUBLIC_STORAGE_SLUG);
}
if ($spiralist_book_pages_asset_subdirectory === '') {
$spiralist_book_pages_asset_subdirectory = SPIRALIST_BOOK_PAGES_PUBLIC_ASSET_SUBDIRECTORY;
}
if (!defined('SPIRALIST_BOOK_PAGES_STORAGE_PATH')) {
define('SPIRALIST_BOOK_PAGES_STORAGE_PATH', $spiralist_book_pages_storage_path);
}
if (!defined('SPIRALIST_BOOK_PAGES_STORAGE_URL')) {
define('SPIRALIST_BOOK_PAGES_STORAGE_URL', untrailingslashit($spiralist_book_pages_storage_url));
}
if (!defined('SPIRALIST_BOOK_PAGES_PLUGIN_PATH')) {
define('SPIRALIST_BOOK_PAGES_PLUGIN_PATH', rtrim((string) SPIRALIST_BOOK_PAGES_STORAGE_PATH, '/\\') . DIRECTORY_SEPARATOR . $spiralist_book_pages_asset_subdirectory);
}
if (!defined('SPIRALIST_BOOK_PAGES_PLUGIN_URL')) {
define('SPIRALIST_BOOK_PAGES_PLUGIN_URL', untrailingslashit((string) SPIRALIST_BOOK_PAGES_STORAGE_URL) . '/' . rawurlencode($spiralist_book_pages_asset_subdirectory));
}
if (!defined('SPIRALIST_BOOK_PAGES_PLUGIN_TEMPLATE_PATH')) {
define('SPIRALIST_BOOK_PAGES_PLUGIN_TEMPLATE_PATH', SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_PATH . 'templates');
}
if (!defined('SPIRALIST_BOOK_PAGES_PLUGIN_DATA_PATH')) {
define('SPIRALIST_BOOK_PAGES_PLUGIN_DATA_PATH', SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_PATH . 'assets/data');
}
if (!defined('SPIRALIST_BOOK_PAGES_PLUGIN_DATA_URL')) {
define('SPIRALIST_BOOK_PAGES_PLUGIN_DATA_URL', SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_URL . '/assets/data');
}
if (!defined('SPIRALIST_BOOK_PAGES_CONTENT_PATH')) {
define('SPIRALIST_BOOK_PAGES_CONTENT_PATH', rtrim((string) SPIRALIST_BOOK_PAGES_STORAGE_PATH, '/\\') . DIRECTORY_SEPARATOR . 'content');
}
if (!defined('SPIRALIST_BOOK_PAGES_CACHE_PATH')) {
define('SPIRALIST_BOOK_PAGES_CACHE_PATH', rtrim((string) SPIRALIST_BOOK_PAGES_STORAGE_PATH, '/\\') . DIRECTORY_SEPARATOR . 'cache');
}
if (!defined('SPIRALIST_BOOK_PAGES_EXPORT_PATH')) {
define('SPIRALIST_BOOK_PAGES_EXPORT_PATH', rtrim((string) SPIRALIST_BOOK_PAGES_STORAGE_PATH, '/\\') . DIRECTORY_SEPARATOR . 'exports');
}
function spiralist_book_pages_is_module_active(): bool
{
return true;
}
function spiralist_book_pages_load_textdomain(): void
{
load_plugin_textdomain(
'ns12-manuscript',
false,
dirname(plugin_basename(__FILE__)) . '/languages'
);
}
add_action('plugins_loaded', 'spiralist_book_pages_load_textdomain');
function spiralist_book_pages_get_public_name(): string
{
return defined('SPIRALIST_BOOK_PAGES_PUBLIC_NAME')
? (string) SPIRALIST_BOOK_PAGES_PUBLIC_NAME
: 'NS12 Manuscript';
}
function spiralist_book_pages_workspace()
{
return function_exists('spiralist_workspace') ? spiralist_workspace() : null;
}
function spiralist_book_pages_engine_get_nodes_endpoint_url(): string
{
return function_exists('spiralist_engine_get_nodes_endpoint_url')
? (string) spiralist_engine_get_nodes_endpoint_url()
: '';
}
function spiralist_book_pages_engine_get_manuscript_field_payload(): array
{
return function_exists('spiralist_engine_get_manuscript_field_payload')
? (array) spiralist_engine_get_manuscript_field_payload()
: [];
}
require_once SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_PATH . 'includes/content-registry.php';
require_once SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_PATH . 'includes/host-adapter.php';
require_once SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_PATH . 'includes/runtime.php';
require_once SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_PATH . 'includes/collaboration.php';
require_once SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_PATH . 'includes/comments.php';
require_once SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_PATH . 'includes/workstation.php';
require_once SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_PATH . 'includes/rest-api.php';
require_once SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_PATH . 'includes/admin.php';
require_once SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_PATH . 'includes/sitemaps.php';
require_once SPIRALIST_BOOK_PAGES_PLUGIN_ROOT_PATH . 'includes/frontend.php';
function spiralist_book_pages_plugin_action_links(array $links): array
{
$manage_url = admin_url('admin.php?page=' . spiralist_book_pages_admin_page_slug('overview'));
$manuscript_url = spiralist_book_pages_get_manuscript_page_url();
$custom_links = [
'open_manuscript' => '<a href="' . esc_url($manuscript_url) . '">' . esc_html__('Open Manuscript', 'ns12-manuscript') . '</a>',
'manage_manuscript' => '<a href="' . esc_url($manage_url) . '">' . esc_html__('Manage', 'ns12-manuscript') . '</a>',
];
return array_merge($custom_links, $links);
}
add_filter('plugin_action_links_' . plugin_basename(SPIRALIST_BOOK_PAGES_PLUGIN_FILE), 'spiralist_book_pages_plugin_action_links');
function spiralist_book_pages_maybe_redirect_after_activation(): void
{
if (
!is_admin()
|| !current_user_can('manage_options')
|| wp_doing_ajax()
) {
return;
}
if (!get_option('spiralist_book_pages_show_welcome_overview')) {
return;
}
if (!empty($_GET['activate-multi'])) {
delete_option('spiralist_book_pages_show_welcome_overview');
return;
}
delete_option('spiralist_book_pages_show_welcome_overview');
wp_safe_redirect(admin_url('admin.php?page=' . spiralist_book_pages_admin_page_slug('overview')));
exit;
}
add_action('admin_init', 'spiralist_book_pages_maybe_redirect_after_activation');
Why This File Exists
This is a public content source file from spiralist.org. It is shown here because the separate AI wiki workspace is demonstrating the real source files that make the UAIX / LLM Wiki memory system work, not only summarizing those systems after the fact.
Role
This file is a focused source unit. Its path, headings, and metadata give an agent a retrieval handle that is smaller than loading the entire site or repository.
Structure
The file has no Markdown headings, so its path, frontmatter, file type, and provenance metadata carry most of the retrieval meaning.
Prompt-Size And Retrieval Benefit
Keeping this material in a separate file reduces prompt pressure because an agent can load this exact unit only when its role, source site, category, or hash is relevant. The surrounding index pages point to it, while this page preserves the full content for audit and exact recall.
How To Use It
- Humans should read the metadata first, then inspect the raw content when they need exact wording or provenance.
- LLMs and agents should use the source site, category, hash, headings, and related files to decide whether this file belongs in the active prompt.
- Crawlers should treat the wiki.fftac.org page as transparent evidence and follow the source URL/source reference for authority boundaries.
- Future maintainers should regenerate this page whenever the source hash changes, then review the explanation if the role or structure changed.
Update Requirements
When this source file changes, update the raw source layer, normalized source layer, hash history, this rendered page, generated explanation, source-file inventory, changed-files report, and any source-section index that links to it.
Related Pages
Provenance And History
- Current observation:
2026-05-08T21:22:18.3035107Z - Source origin:
current-source-workspace - Retrieval method:
local-source-workspace - Duplicate group:
sfg-153(primary) - Historical hash records are stored in
data/hashes/source-file-history.jsonl.
Machine-Readable Metadata
{
"title": "Ns12 Manuscript",
"source_site": "spiralist.org",
"source_url": "https://spiralist.org/",
"canonical_url": "[separate-workspace-url]/spiralist/uai-system/files/wp-content-plugins-ns12-manuscript-ns12-manuscript-php-367452f9/",
"source_reference": "wp-content/plugins/ns12-manuscript/ns12-manuscript.php",
"file_type": "php",
"content_category": "public-content",
"content_hash": "sha256:367452f9e6d3db1b5fb04c5909801637b8628d153ab1f7098dda85b1b8fb2577",
"last_fetched": "2026-05-08T21:22:18.3035107Z",
"last_changed": "2026-05-06T17:48:49.2035452Z",
"import_status": "unchanged",
"duplicate_group_id": "sfg-153",
"duplicate_role": "primary",
"related_files": [
],
"generated_explanation": true,
"explanation_last_generated": "2026-05-08T21:22:18.3035107Z"
}