PHP And WordPress Coding Standard
WordPress code should be boring in the best way: predictable hooks, escaped output, explicit route ownership, and clean separation between content and generated artifacts.
Metadata
| Field | Value |
|---|---|
| Source site | aiwikis.org |
| Source URL | https://aiwikis.org/ |
| Canonical AIWikis URL | https://aiwikis.org/files/aiwikis/wiki-global-coding-standards-php-wordpress-md-fa49de43/ |
| Source reference | wiki/global/coding-standards/php-wordpress.md |
| File type | md |
| Content category | llm-wiki |
| Last fetched | 2026-05-08T21:22:18.3035107Z |
| Last changed | 2026-05-08T02:37:10.1743477Z |
| Content hash | sha256:fa49de433cd289c9cf48a94c240e60ab6ae16f25235c77d831f1a59fd1f180d6 |
| Import status | unchanged |
| Raw source layer | data/sources/aiwikis/wiki-global-coding-standards-php-wordpress-md-fa49de433cd2.md |
| Normalized source layer | data/normalized/aiwikis/wiki-global-coding-standards-php-wordpress-md-fa49de433cd2.txt |
Current File Content
Structure Preview
- PHP And WordPress Coding Standard
- WordPress Shape
- Content Boundaries
- Tests
Raw Version
---
uai_id: "f36c7310-7583-4043-bb45-c77c0a4444c9"
type: "coding-standard"
owner: "AIWikis maintainers"
status: "reviewed"
source_system: "AIWikis.org global"
source_status: "local synthesis from WordPress site implementation practice"
sensitivity: "public-safe source-side memory"
agent_use: "load for WordPress plugin, theme, shortcode, REST, locale, and content-rendering work"
lineage:
- "wiki/global/coding-standards/index.md"
- "wiki/uaix/index.md"
- "wiki/llmwikis/index.md"
- "wiki/index.md"
- "wiki/spiralist/index.md"
source_trace:
- "wiki/global/coding-standards/php-wordpress.md"
confidence: 0.82
confidence_label: "reviewed-local"
last_linted: "2026-05-08T00:00:00Z"
handoff_export: "include"
aliases:
- "PHP Coding Standard"
- "WordPress Coding Standard"
---
# PHP And WordPress Coding Standard
WordPress code should be boring in the best way: predictable hooks, escaped output, explicit route ownership, and clean separation between content and generated artifacts.
## WordPress Shape
- Keep plugin and theme responsibilities separate.
- Use WordPress APIs for routes, REST handlers, escaping, sanitization, enqueueing, and option access.
- Escape output at render time with the appropriate `esc_*` helper.
- Sanitize request values before use.
- Keep locale routing and clean URL policy aligned with the owning site's launch constraints.
## Content Boundaries
- Do not publish raw `.uai`, `AGENTS.md`, archive, or intake files as public pages unless a source-site workflow deliberately rewrites them as public copy.
- Keep generated pages out of source truth unless the source system explicitly treats them as reviewed content.
- Preserve authority boundaries in copy: AIWikis can remember, but source sites own their claims.
## Tests
- Run the site's smoke or link checks after public route changes.
- Check sitemap and discovery output when changing public page inventory.
- Keep packaging checks for release-bound work rather than ordinary local edits.
Why This File Exists
This is a LLM Wiki memory file from aiwikis.org. It is shown here because AIWikis.org 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 belongs to the source-side wiki layer. It preserves a focused concept, source proxy, graph record, or operating rule so the public site can cite reviewed conclusions without flattening every reason into a single long page.
Structure
The file is structured around these visible headings: PHP And WordPress Coding Standard; WordPress Shape; Content Boundaries; Tests. Those headings are retrieval anchors: a crawler or LLM can decide whether the file is relevant before reading every line.
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 AIWikis 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-731(primary) - Historical hash records are stored in
data/hashes/source-file-history.jsonl.
Machine-Readable Metadata
{
"title": "PHP And WordPress Coding Standard",
"source_site": "aiwikis.org",
"source_url": "https://aiwikis.org/",
"canonical_url": "https://aiwikis.org/files/aiwikis/wiki-global-coding-standards-php-wordpress-md-fa49de43/",
"source_reference": "wiki/global/coding-standards/php-wordpress.md",
"file_type": "md",
"content_category": "llm-wiki",
"content_hash": "sha256:fa49de433cd289c9cf48a94c240e60ab6ae16f25235c77d831f1a59fd1f180d6",
"last_fetched": "2026-05-08T21:22:18.3035107Z",
"last_changed": "2026-05-08T02:37:10.1743477Z",
"import_status": "unchanged",
"duplicate_group_id": "sfg-731",
"duplicate_role": "primary",
"related_files": [
],
"generated_explanation": true,
"explanation_last_generated": "2026-05-08T21:22:18.3035107Z"
}