Gieo Quẻ Kinh Dịch (SOW Hexagram for WordPress - wpsowhexagram) is an enterprise-grade WordPress plugin that establishes a full-featured, traditional I-Ching divination application directly on frontend pages. It supports two primary traditional methodologies: Six-Line Divination (Lục Hào) featuring 64 I-Ching hexagrams, Nạp Giáp stems/branches, Five Elements interactions, Five Relations (Lục Thân), Six Beasts (Lục Thú), World/Application positions (Thế Ứng), Void lines (Không Vong), and Transformed Hexagrams (Quẻ Biến); and Plum Blossom Numerology (Mai Hoa Dịch Số) offering solar-lunar time calculations, Ti-Yong analysis, Mutual hexagrams (Quẻ Hỗ), Transformed hexagrams, Four Seasons Five Elements elemental matrix, and detailed modal interpretations.
Powered by a compressed 10-century Solar-to-Lunar conversion algorithm (1200 - 2199), the plugin computes exact Can Chi dates, leap months, and 12 Chinese hourly periods. It features a complete 6-tab WYSIWYG admin customization suite and a memory-safe ZIP backup & restore engine for seamless data migration.
Core Feature Subsystems
1. Six-Line (Lục Hào) Divination Subsystem
- 3-Coin Simulation & Manual Line Input: Simulate traditional 3-coin tosses 6 times from Line 1 to Line 6, or manually specify line states (Static Yin, Static Yang, Moving Yin, Moving Yang).
- Automated Nạp Giáp & Five Relations Mapping: Automatically assigns Heavenly Stems and Earthly Branches to each line based on the 8 Trigram families (Càn, Khảm, Cấn, Chấn, Tốn, Ly, Khôn, Đoài). Computes Five Elements interactions to establish Five Relations (Huynh, Phụ, Quan, Tử, Tài).
- Six Beasts & World/Application Lines: Maps Six Beasts (Thanh Long, Chu Tước, Câu Trần, Đằng Xà, Bạch Hổ, Huyền Vũ) according to the Day Stem, identifies World (Thế) and Application (Ứng) line positions, and computes Void (Không Vong) branches.
2. Plum Blossom (Mai Hoa Dịch Số) Numerology Engine
- Time-Based & Manual Trigram Derivation: Calculates Upper Trigram, Lower Trigram, and Moving Line using exact solar date and hourly periods, or permits manual trigram and moving line selections.
- Ti-Yong & Four Seasons Elemental Strength: Identifies Static Ti Trigram and Dynamic Yong Trigram, constructs Mutual and Transformed hexagrams, and evaluates Five Elements seasonal strength across the 5 seasonal periods (Vượng, Tướng, Hưu, Tù, Tử).
3. 10-Century Lunar Calendar & Admin Management
- 10-Century Solar-Lunar Converter (1200 - 2199): Decodes compressed calendar data (TK13 - TK22) for accurate Can Chi date conversion.
- 6-Tab WYSIWYG Admin Panel: Customizes logo displays, general Mai Hoa interpretations, 64 hexagrams JSON, Lục Thân JSON, Lục Thú JSON, Mai Hoa Trigrams JSON, and custom collapsible FAQs accordions.
- Memory-Safe ZIP Backup & Restore Engine: Exports all plugin settings into a compressed ZIP file and restores configurations via 1-click AJAX file verification.
System Architecture & Synchronization Data Workflow
graph TD
A[Frontend Shortcode pxg_sowhexagram] --> B{Select Divination Mode}
B -->|Luc Hao Divination| C[Random 3-Coin Simulation or Manual Lines Input]
B -->|Mai Hoa Numerology| D[Solar-Lunar Time Calculator or Manual Trigrams]
C --> E[10-Century Lunar Calendar Engine TK13-TK22]
D --> E
E --> F[PXGHexagram Front Controller Computations]
F --> G[Nap Giap & Five Elements Matrix Calculations]
G --> H[Luc Than, Luc Thu & Void KV Line Mapping]
H --> I[Ti-Yong & Transformed Hexagram Analysis]
I --> J[AJAX Response Payload & Interactive Result Modal]
Six-Line Lục Hào Divination Pipeline
graph TD
A[6 Coin Tosses / Line Input] --> B[Binary 6-Bit Line State Matrix]
B --> C[Match Primary Hexagram & Family Group Càn Khảm Cấn Chấn Tốn Ly Khôn Đoài]
C --> D[Assign Nap Giap Heavenly Stems & Earthly Branches]
D --> E[Calculate Five Elements Interactivity]
E --> F[Map Five Relations Huynh Phu Quan Tu Tai]
F --> G[Locate World & Application Lines Shi Ying]
G --> H[Assign Six Beasts based on Day Stem]
H --> I[Identify Void Branches & Transformed Lines]
I --> J[Output Comprehensive Luc Hao Chart Analysis]
Plum Blossom Mai Hoa Numerology Engine
graph TD
A[Solar Date & Hour Inputs] --> B[Convert to Lunar Calendar Values]
B --> C[Upper Trigram = Solar Sum % 8]
B --> D[Lower Trigram = Solar + Hour % 8]
B --> E[Moving Line = Solar + Hour % 6]
C --> F[Determine Ti Static Trigram & Yong Dynamic Trigram]
D --> F
E --> F
F --> G[Construct Mutual Hexagram & Transformed Hexagram]
G --> H[Evaluate Four Seasons Elemental Power Vượng Tướng Hưu Tù Tử]
H --> I[Display Detailed Interpretation & Custom FAQs Accordion]