Skip to content

Added Bidirectional Sync for Concept Relationships

Last updated on June 7, 2026

Previously, Concept relationships in the lexicon were one-way — linking A → B didn’t automatically link B → A, making maintenance difficult and inconsistent. I added a custom PHP hook in /inc/concept_relations.php that runs on every Concept save, checking the related_concepts field and updating the reverse relationships accordingly. This ensures all linked Concepts remain synchronized in both directions without requiring manual edits, greatly improving data consistency and future scalability.