WP Manifestindependent plugin directory
manifest / content / restricted-authors

AuthorFence

Restrict which categories each author can publish in, with per-author and per-role default category support.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/iwritec0de/restricted-authors/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

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 → AuthorFence lets you add category restrictions for any role that has edit_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 categories endpoint is filtered so restricted users only see the categories they can publish in.
  • Self-updating — bundled GitHub Releases updater checks iwritec0de/authorfence for new tagged releases.
  • Clean uninstall — uninstall.php removes all options, transients, and per-user meta.

Requirements

  • WordPress 6.5+
  • PHP 8.0+

Installation

  1. Download the latest release zip from the Releases page, or clone this repo and run the build.
  2. Upload via Plugins → Add New → Upload Plugin and activate, or drop the folder into wp-content/plugins/.
  3. 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

  1. Administrators → null (unrestricted).
  2. Per-user override → explicit term IDs.
  3. Role-based restrictions → most permissive role wins. Any unrestricted configured role → null.
  4. Otherwise → null.

License

GPL-2.0-or-later. See LICENSE.