- Register repo_daily CPT at /daily/[slug]/ for editorial publications - Register repo_daily_category taxonomy with 4 seeded terms - Add Repo Daily metabox for author byline and clinical review flag - Bulk-migrate _repo_daily_author on autoblogged posts (psa_source) - Update ARCHITECTURE.md with content-type table and scanner scope - Update CONVENTIONS.md with repo_daily meta field extension pattern - Bump version to 0.5.0, add CHANGELOG entry Closes v0.5.0 scope.
7.1 KiB
7.1 KiB
Changelog
All notable changes to Peptide Repo Core are documented here. Format: Semantic Versioning.
[0.5.0] — 2026-04-27
Added
- Repo Daily CPT: New
repo_dailycustom post type at/daily/[slug]/for editorial publications (articles, guides, comparisons, news) generated by PRAutoBlogger and published under the Boo Sheeran byline. - Repo Daily Category Taxonomy: Non-hierarchical
repo_daily_categorytaxonomy with four seeded terms (article, guide, comparison, news) for editorial classification. - Repo Daily Meta Fields:
_repo_daily_author(string, default "Boo Sheeran") — byline displayed in theme templates. Never hardcoded; always read from meta._repo_daily_clinical_review_required(bool, stored as '1'/'') — editorial flag marking posts that require PR Clinical Review before publication.
- Repo Daily Admin Meta Box: "Article Settings" meta box on repo_daily edit screen with author byline field and clinical review flag checkbox.
- Bulk Author Migration: On activation, sets
_repo_daily_author = 'Boo Sheeran'on all post_type=post posts bearing the psa_source meta key (autoblogged articles). Idempotent; existing meta values preserved. Posts remain post_type=post; forward-only migration for byline retroactivity.
Changed
PR_Core_Admin::register_hooks()now registers repo_daily metaboxes alongside peptide metaboxes.
Technical
- New classes:
PR_Core_Repo_Daily_CPT,PR_Core_Repo_Daily_Taxonomy,PR_Core_Repo_Daily_Metaboxes. - New method:
PR_Core_Activator::migrate_autoblogged_author_meta()— idempotent bulk meta setter. - Taxonomy seeding:
PR_Core_Repo_Daily_Taxonomy::seed_terms()called on activation.
Documentation
- ARCHITECTURE.md: Added repo_daily CPT to content-type table; documented scanner exclusion by CPT separation.
- CONVENTIONS.md: Added "How to add a new post meta field to repo_daily posts" extension pattern.
[0.4.0] — 2026-04-27
Added
- Verification Scanner: Automated periodic scanning of all published peptides to compute verification status (current/due/overdue) based on days since last verification and configurable velocity-based thresholds.
- Verification Settings: New admin settings page under Peptides menu with configuration for scan cadence (daily/weekly/monthly), staleness thresholds (default 180 days, high-velocity 60 days, low-velocity 365 days), and notification email recipients.
- Dashboard Widget: "Monographs Needing Review" dashboard widget showing all peptides due or overdue for verification, sorted by staleness, with direct edit links and one-click scan trigger.
- Editor Sidebar Meta Box: New "Verification Status" sidebar meta box on peptide edit screen showing last-verified date, velocity selector, status badge, and one-click "Mark Verified Today" button that sets verification date to current time and recomputes status.
- Admin AJAX Handlers: Two new admin-ajax actions:
pr_core_mark_verified: Sets_pr_last_source_verifiedto today, saves optional notes, recomputes status.pr_core_scan_now: Runs verification scanner immediately from the dashboard widget.
- Frontend Verification Display: On single-peptide pages, displays "Last verified: [date] — methodology" text after the verdict card div (requires non-empty
_pr_last_source_verifiedmeta field). - Verification Meta Fields (registered in CPT):
_pr_last_source_verified: ISO datetime of most recent source verification._pr_last_reviewed: ISO datetime of editorial review (phase 2 integration point)._pr_next_review_by: ISO datetime of next scheduled review (phase 2 integration point)._pr_verification_velocity: Enum (low/medium/high) controlling threshold application._pr_verification_notes: Textarea for reviewer notes on the most recent verification pass._pr_verification_status: Enum (current/due/overdue) computed by scanner; drives widget sorting and badge color.
- Scan Log: Option
pr_core_verification_scan_logstores last 90 scan summaries (timestamp, total count, due count, overdue count) for audit trail and health monitoring. - Email Digest: When scans detect due/overdue peptides, a digest email is sent to configured recipients (default: none, must opt-in) with links to edit each peptide and the verification dashboard.
Changed
- CPT meta field registration now includes 6 new verification fields alongside existing dosing/legal/editorial fields.
Technical
- New classes:
PR_Core_Verification_Scanner,PR_Core_Settings,PR_Core_Verification_Widget,PR_Core_Verification_Display,PR_Core_Ajax_Handlers. - New unit tests:
test-verification-scanner.php(status computation logic),test-verification-settings.php(cadence/cron scheduling). - WordPress cron integration:
pr_core_verification_scanhook scheduled at activation, cleared at deactivation, rescheduled when cadence changes.
[0.2.2] — 2026-04-25
Fixed
- Remove
rest_namespacefrom peptide CPT registration. Custom namespace prevented Gutenberg block editor from loading peptide posts for editing (404 on wp/v2 REST route). All 89 peptide entries are now editable in the block editor.
[0.2.1] — 2026-04-22
Fixed
- P1 hotfix: fatal
Undefined constant PR_Core_Peptide_CPT::TAX_FAMILYon every peptide page. The v0.2.0 release removedTAX_FAMILYfromPR_Core_Peptide_CPTbut left two stale references inPR_Core_Peptide_Repository(thefamilyfilter branch infind_all()and the families lookup inpost_to_dto()). JSON-LD emission on single-peptide templates calledfind_by_id(), which calledpost_to_dto(), which hit the undefined constant and killed page rendering mid-wp_head(). QA gate on874f93bmissed this because the unit tests cover the CPT class in isolation, not the repository's consumption of its constants. Post-mortem + QA checklist update to follow.
Changed
PR_Core_Peptide_Repository::find_all()—familyfilter is now silently ignored rather than throwing. Next minor bump will remove it from the REST schema.PR_Core_Peptide_DTO::$familiesis preserved but always populated as[]. Keeps REST response shape stable for existing clients; will be dropped with a release note.
[0.2.0] — 2026-04-22
Changed (BREAKING)
- CPT renamed from
pr_peptidetopeptide. Consolidates with PSA's existingpeptideCPT which owns the 89 canonical peptide posts on production. - Taxonomy renamed from
pr_peptide_categorytopeptide_category. Same reason. - CPT args harmonized as superset of PSA + prior PR Core registration (supports now includes thumbnail + revisions + custom-fields).
- Defensive registration: guards with
post_type_exists()/taxonomy_exists()so PSA's parallel registration no-ops cleanly during the PSA v4.5.0 transition.
Added
PR_Core_Activator::maybe_flush_on_version_change()— one-shot rewrite flush on in-place version bumps (hooked atinitpriority 999). Eliminates the need for a manualwp rewrite flushafter updates that change CPT/taxonomy slugs._pr_core_authoredpost-meta flag contract — peptide posts created via PR Core UI carry this flag;uninstall.phpuses it to scope teardown to plugin-owned posts only.