Admin components for the Unity intergroup management plugin. Requires Scrutiny for GDPR compliance.
Amber provides the WordPress admin interface layer for the Unity intergroup management framework. It adds admin menus, dashboard widgets, column customisations, shortcodes, and data-validation hooks for managing members, positions, meetings, and intergroup meetings — all backed by Unity's service container and Scrutiny's audit logging.
Dependencies: Unity, Scrutiny License: MIT (Modified — see License) Author: The Bleeding Deacons
- Features
- Installation
- Requirements
- Usage
- Architecture
- Meeting Reconciliation
- Building for Production
- License
- Intergroup admin menu — top-level Intergroup menu grouping Positions, Members, Groups / Meetings, and Intergroup Meetings into a single navigation tree.
- Dashboard widgets — three dashboard panels: Position Directory (current holders and rotation status), Meeting Listings (sorted by day/time with reconciliation badges), and Intergroup Meeting Attendance (group and officer attendance records).
- Position shortcodes —
[position_state],[position_header],[directory_list], and[position_summary]for embedding position data in posts and pages. - Admin column enhancements — extra columns and sort options on the Members, Meetings, and Positions admin list tables (GSR status, group name, service position, rotation info).
- Field validation — real-time AJAX uniqueness checks for anonymous names and position long names, with server-side ACF validation as a safety net. A member's Personal Email is likewise refused if it carries the intergroup's own domain (
aa-bristol.org), since those addresses forward by role rather than reaching the member; override the domain list with theamber_intergroup_email_domainsfilter. - Post title syncing — automatically keeps post titles in sync with designated ACF field values for members and positions, with re-entrancy guards to prevent infinite loops.
- Meeting reconciliation — when the Concordance plugin is active, Amber cross-references local Unity meetings against the national AAGBDB group listing and displays match/mismatch badges on the meeting dashboard.
- Intergroup meeting management — full admin interface for creating intergroup meetings and recording group attendance (GSR/proxy) and officer attendance (position-linked).
- Scrutiny integration — requires the Scrutiny plugin, ensuring all personal-data access is audit-logged and GDPR-compliant.
- Ensure the Unity and Scrutiny plugins are installed and activated.
- Download or build the
amber.ziparchive. - In WordPress, go to Plugins → Add New → Upload Plugin.
- Upload the
.zipfile and click Install Now. - Activate the plugin.
- Clone or copy the
amberdirectory intowp-content/plugins/. - Activate the plugin from the WordPress admin.
Amber will refuse to activate if Unity or Scrutiny is not available, and will auto-deactivate if Scrutiny is deactivated while Amber is active.
- WordPress 6.0+
- PHP 8.6+
- Unity plugin — installed and activated
- Scrutiny plugin — installed and activated (GDPR compliance)
- Advanced Custom Fields (ACF) — used by Unity for data storage
- Concordance (optional) — enables meeting reconciliation against the AAGBDB national listing
Once activated, an Intergroup menu appears in the WordPress admin sidebar with sub-pages for:
- Positions — manage intergroup service positions
- Members — manage intergroup members with anonymous names and GSR status
- Groups / Meetings — view and manage meetings linked to groups
- Intergroup Meetings — create meetings and record group/officer attendance
Three widgets appear on the WordPress admin dashboard:
- Position Directory — lists all positions with current holders, sobriety dates, term dates, and rotation status.
- Meeting Listings — meetings sorted by day and start time. When Concordance is active, each card shows a reconciliation badge indicating whether the meeting was found in the national listing.
- Intergroup Meeting Attendance — select a meeting from a dropdown to see group attendance (with GSR and proxy info) and officer attendance tables.
Amber registers four shortcodes for embedding position data in posts and pages:
[position_state]/[position_highlight]— displays a rotation-status badge[position_header]— renders the position title, sobriety requirement, term, and email link[directory_list]— outputs a full directory table of all positions and holders[position_summary]— renders the rich-text summary field for a position
Amber registers its services in Unity's container. Use the global amber() helper to resolve them:
// Access Amber's container (which is Unity's container)
$container = amber();
// Hook into Amber's initialization
add_action('amber/loaded', function (\Psr\Container\ContainerInterface $container) {
// Amber is ready
});Amber follows a service-oriented architecture, registering all services into Unity's existing PSR-11 container.
amber/
├── Amber.php # Plugin bootstrap & dependency checks
├── composer.json # Dependencies & PSR-4 autoloading
├── build.php # Cross-platform build/packaging script
├── assets/
│ ├── docs/amber.html # Bundled HTML documentation
│ └── js/
│ ├── anonymous-name-validator.js # AJAX uniqueness check (members)
│ └── position-name-validator.js # AJAX uniqueness check (positions)
└── src/
├── Plugin.php # Service registration & initialization
├── Common/
│ ├── AmberConfiguration.php # Field constants
│ └── Functions.php # Utility helpers (email links, etc.)
├── Managers/
│ ├── IntergroupManager.php # Position meta updates & hooks
│ ├── MeetingReconciler.php # AAGBDB reconciliation engine
│ ├── PositionShortcodeRenderer.php # Shortcode registration & rendering
│ └── PostTitleSyncer.php # Title ↔ ACF field sync
├── Models/
│ └── ReconciliationResult.php # Immutable reconciliation value object
└── Admin/
├── Members/
│ ├── MemberAdmin.php # Member list table customisation
│ ├── AnonymousNameValidator.php # AJAX + ACF name uniqueness
│ └── PersonalEmailValidator.php # ACF guard: no intergroup addresses
├── Positions/
│ ├── PositionAdmin.php # Position list table & meta
│ ├── PositionDashboard.php # Dashboard widget
│ └── PositionNameValidator.php # AJAX + ACF name uniqueness
├── Meetings/
│ ├── MeetingAdmin.php # Meeting list table (group column)
│ └── MeetingDashboard.php # Dashboard widget + reconciliation
└── IntergroupMeetings/
├── IntergroupMeetingAdmin.php # Full CRUD admin
├── IntergroupMeetingDashboard.php # Dashboard widget
├── IntergroupMeetingAttendanceDashboard.php # Attendance detail page
└── IntergroupMeetingGroupAttendanceDashboard.php # Group attendance view
Service dependency graph:
PostTitleSyncer— standaloneIntergroupManager→ Configuration, PositionViewFactory, PostTitleSyncerPositionShortcodeRenderer→ Configuration, PositionViewFactoryMeetingReconciler→ MeetingRepository, Concordance ApiCache (optional)- All admin classes → various Unity repositories and factories
All services are registered as lazy singletons in Unity's container and only instantiated when first requested.
When the Concordance plugin is active, Amber's MeetingReconciler cross-references local Unity meetings against the national AAGBDB group listings:
- Confident match — same day + same start time + name similarity above threshold
- Possible match — same day + same start time, but names are too dissimilar
- Local only — present in Unity but not found nationally
- National only — present in AAGBDB but not found locally
The meeting dashboard widget displays a colour-coded badge for each meeting indicating its reconciliation status.
The included build.php script packages the plugin into a distributable .zip archive, stripping development files.
# Production build
php build.php build:production
# Development build (includes tests)
php build.php build:dev
# Clean the build directory
php build.php cleanYou can override the version number with --version=X.X and add --clean to wipe the build directory before packaging.
Install the dev dependencies and run the suite from the plugin directory:
composer install| Command | Description |
|---|---|
composer test |
Run the Pest test suite |
composer phpstan |
Run PHPStan static analysis |
The suite is written in Pest (on PHPUnit) with Mockery for mocking. Line coverage is reported to Coveralls on every CI run — see the coverage badge at the top of this file.
MIT License (Modified) — Copyright © 2025 The Bleeding Deacons.
This software is provided under the standard MIT license with one additional restriction: the licensee may not sell the Software, alone or as part of an aggregate software distribution containing the Software.
See LICENSE for the full text.