DP Judge Role Sync
Sync dp-dashboard judge meta when entry_judge role is set in WP Admin
by Don't Panic Projects · github.com/dp-harrison/dp-judge-role-sync
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/dp-harrison/dp-judge-role-sync/releases/download/v1.0.0/dp-judge-role-sync-1.0.0.zipLightweight WordPress plugin for Don't Panic Awards sites using dp-dashboard.
When a user is assigned the Judge (entry_judge) role in WP Admin → Users, this plugin syncs the user meta and activation state that the awards dashboard expects—so the judge appears on Site Dashboard → Judges without using the custom “Add judge” form.
Requirements
- WordPress 6.0+
- PHP 7.4+
dp-dashboard(registers theentry_judgerole)dp-entries(optional; only needed for category assignment fallback)
What it syncs
On first assignment to entry_judge:
| Item | Action |
|---|---|
activation_status |
Set to ACTIVATED |
user_activation_key |
Cleared |
assigned_categories |
Empty array (if missing) |
is_current |
true (if missing) |
display_order |
0 (if missing) |
user_meta_{id} transient |
Cleared |
Category assignment is not automatic by default. Assign categories in Site Dashboard → Judges → Edit judge.
Optional: auto-assign categories
add_filter( 'dp_judge_role_sync_category_ids', function ( $ids, $user_id, $user ) {
return [ 12, 34 ]; // category IDs
}, 10, 3 );
When dp-dashboard is loaded, this uses the existing assign_judge_categories() helper so judges_assigned on categories stays in sync.
Installation
- Upload the plugin folder to
wp-content/plugins/dp-judge-role-sync/ - Activate DP Judge Role Sync in WP Admin → Plugins
Or install from the release zip.
Usage (e.g. existing user → judge)
- WP Admin → Users → Edit user
- Set Role to Judge
- Update User
- Open Site Dashboard → Judges and assign categories if needed
License
GPL-2.0-or-later
Releases
1 release. Each count is every asset in that release; expand a row for the breakdown.