AuthorFence
Restrict which categories each author can publish in, with per-author and per-role default category support.
by Chris Kelley · github.com/iwritec0de/restricted-authors · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/iwritec0de/restricted-authors/archive/refs/heads/main.zipReadme
AuthorFence
Restrict which categories each author can publish in — per role, per user, with smart default-category resolution.
AuthorFence is a WordPress plugin for editorial teams that need to keep specific authors (or entire roles) inside a defined set of categories. It works in both the classic and block editors, handles multi-role users, and ships with a GitHub-based auto-updater.
Features
- Per-role restrictions — dynamic, searchable picker on
Settings → AuthorFencelets you add category restrictions for any role that hasedit_posts. - Per-user overrides — individual authors can have a bespoke category list set from their profile screen.
- Priority chain for the default category —
user → role → global → WordPress default. - Multi-role resolution — most permissive role wins; any unrestricted role makes the user unrestricted.
- Administrators are never restricted.
- Block editor aware — the REST
categoriesendpoint is filtered so restricted users only see the categories they can publish in. - Self-updating — bundled GitHub Releases updater checks
iwritec0de/authorfencefor new tagged releases. - Clean uninstall —
uninstall.phpremoves all options, transients, and per-user meta.
Requirements
- WordPress 6.5+
- PHP 8.0+
Installation
- Download the latest release zip from the Releases page, or clone this repo and run the build.
- Upload via Plugins → Add New → Upload Plugin and activate, or drop the folder into
wp-content/plugins/. - Configure role restrictions under Settings → AuthorFence. Per-user overrides live on each user's profile screen.
Resolving Allowed Categories
AuthorFence::get_allowed_categories_for_user( \WP_User $user ): ?array
- Administrators →
null(unrestricted). - Per-user override → explicit term IDs.
- Role-based restrictions → most permissive role wins. Any unrestricted configured role →
null. - Otherwise →
null.
License
GPL-2.0-or-later. See LICENSE.