- PR_Core_Jsonld_Article: meta-triggered emitter for PRAutoBlogger posts (trigger: _prab_schema_version=1 on post type). Yoast path retypes page node to MedicalWebPage (wpseo_schema_webpage_type priority 10) and enriches Article piece with citation[], about[]→Drug @id, lastReviewed, honest reviewedBy (wpseo_schema_graph priority 13). No-Yoast fallback emits standalone @graph. Posts without trigger meta are byte-unchanged. - PR_Core_Prab_Meta_Reader: sanitises all _prab_* contract-v1 meta at read time. URLs validated (http/https), DOIs normalised to https://doi.org/ URI, JSON arrays per-element validated, WP user ID resolved. Malformed values degrade gracefully. Honest reviewedBy: Person ONLY when mode=human + valid user ID; else Organization. Never a fabricated person. - Unit tests: JsonldArticleTest.php — 22 assertions covering is_triggered, review_mode, reviewed_by Person/Org decision tree, citation sanitization, DOI normalisation, about linkage, retype passthrough, enrich, no-new-nodes, editorial-system-never-person. - bootstrap.php: WP_User stub + get_userdata reads pr_test_userdata global. - ARCHITECTURE.md: updated JSON-LD class tree + PRAB emission section. - CONVENTIONS.md: PRAB contract v2 extension guide added. - CHANGELOG.md + version bump to v0.8.0. Ratified contract: convo/prcore/decisions/2026-06-11-jsonld-contract-v1.md File sizes: article.php=235L, meta-reader.php=265L (both < 300-line gate). No duplicate Article/WebPage nodes. uninstall.php unaffected (_prab_* unowned). Agent-Session: prcore-jsonld-article-20260622
14 KiB
14 KiB