Skip to content

mimdigital/role-based-admin-menu-lite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Role-Based Admin Menu Lite

Role-Based Admin Menu Lite is a lightweight WordPress plugin that allows you to control which admin menu and submenu items are visible to users based on their roles. You can easily hide specific items from the WordPress admin sidebar for any role, and the plugin also blocks direct URL access to those hidden pages, ensuring both privacy and security—while offering a built-in safe mode in case you lock yourself out.


Features

  • Hide Admin Menus by Role: Choose which top-level and submenu items each role can see in the admin sidebar.
  • Blocks Direct URL Access: Hidden pages return a 403 "Access Denied" for those roles. This is not just cosmetic!
  • Safe Mode: Add ?rbamm_safe=1 to any admin URL to temporarily bypass hiding rules for the session. Perfect for recovery if you accidentally hide your only access point.
  • Admin Bypass: By default, users who can manage_options (usually site admins) are never restricted, for safety—this can be turned off.
  • Lightweight & Secure: No drag-and-drop ordering, renaming, import/export, or multisite-wide overrides: just the essentials for maximum speed and safety.

Installation

  1. Download or clone this repository.
  2. Copy the role-based-admin-menu-lite/ folder to your site's wp-content/plugins/ directory.
  3. Activate Role-Based Admin Menu Lite in the WordPress Plugins screen.

Usage

  1. Go to Settings → Admin Menu Lite in your WordPress admin area.
  2. For each role, check the menus and submenus you want to hide.
  3. Click Save Changes.

Blocked pages will be removed from the sidebar and are also inaccessible directly (returns a 403).

Recovery / Safe Mode

If you accidentally hide the settings page or lock yourself out, simply append ?rbamm_safe=1 to any admin URL (e.g., /wp-admin/options-general.php?rbamm_safe=1). This temporarily disables all restrictions for that session and shows a warning banner.

Reset

There’s a Reset section on the settings page to restore all role-based menu rules to the default (shows everything).


Uninstallation

To fully uninstall, delete the plugin using the WordPress Plugins screen. This will also remove all its stored settings.


Notes & Limitations

  • Per-Site Only: Rules are set per site. No multisite/global rules or import/export.
  • Safe Defaults: By default, only users without manage_options are affected. You can change this behavior in the Options panel.
  • Submenu Blocking: Hiding a specific submenu blocks only that combination (parent|child), following WordPress’s native menu pattern.

About

  • Author: MannyKO
  • License: GPLv2 or later
  • Stable Version: 1.0.0

This plugin is designed to be safe, simple, and effective—no bloat or over-complication.


Contributions

Feedback, issues, and requests are welcomed! See the issues page or submit a pull request.


Translating

Create a languages/ folder in role-based-admin-menu-lite/ and add your .pot/.po/.mo files for localization.


Enjoy a cleaner, safer WordPress admin experience tailored to each role!

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages