LW ZenAdmin
Clean up your WordPress admin - notices sidebar, dashboard widgets, admin menu, and admin bar manager.
Overview
| Requires WordPress | 6.0+ |
| Requires PHP | 8.1+ |
| Tested up to | 6.7 |
| License | GPL-2.0-or-later |
| GitHub | lwplugins/lw-zenadmin |
Installation
composer require lwplugins/lw-zenadminOr upload the lw-zenadmin folder to /wp-content/plugins/ and activate through the Plugins menu.
Features
Notice Collector
All admin notices are collected into a clean sidebar panel accessible from the admin bar. No more visual clutter breaking your admin layout.
- Admin bar button - “Notices” label with a live badge count
- Sidebar panel - slides in from the right with all collected notices
- Flash-free - early CSS hides notices before JS loads (no flash of unstyled notices)
- Dynamic - picks up notices generated during plugin updates/installs
- Multiple close methods - Escape key, overlay click, or X button
- Supports dynamically added notices (plugin updates, etc.)
- Inline notices (
.inline,.below-h2) are left in place as WordPress intended
Dashboard Widget Manager
Control which widgets appear on your WordPress dashboard. Core and WooCommerce widgets are enabled by default, third-party widgets are hidden until you enable them.
- Auto-discovery - detects all registered dashboard widgets automatically
- Grouped display - WordPress Core, WooCommerce, Third-party
- Sensible defaults - Core + WooCommerce visible, Third-party hidden (no setup required)
- Checkbox UI - simple table interface on the settings page
Admin Bar Manager
Control which items appear in the WordPress admin bar. Hide clutter from cache plugins, SEO tools, and other plugins that add unnecessary toolbar items.
- Auto-discovery - detects all registered admin bar nodes
- Grouped by source - WordPress Core, WooCommerce, Third-party
- Protected items - My Account, Logout cannot be hidden (prevents lockouts)
- Works on both admin pages and frontend
- Disabled by default - opt-in via settings
Admin Menu Manager
Control which menu items appear in the admin sidebar. Hide unused menus to keep things clean while protected items stay visible.
- Auto-discovery - detects all registered admin menus and submenus
- Grouped by source - WordPress Core, WooCommerce, LW Plugins, Third-party
- Protected menus - Dashboard, Settings, Plugins, LW Plugins cannot be hidden
- Individual submenu control with parent grouping
Settings
Configure under LW Plugins > ZenAdmin. Each feature can be independently enabled or disabled.
| Option | Default | Description |
|---|---|---|
notices_enabled | true | Enable/disable the notice collector |
widgets_enabled | true | Enable/disable the widget manager |
menu_enabled | false | Enable/disable the admin menu manager |
adminbar_enabled | false | Enable/disable the admin bar manager |
Widget visibility is stored separately (lw_zenadmin_widget_settings) and can be managed from the admin UI or CLI.
WP-CLI Commands
Feature Management
wp lw-zenadmin status
Display the current status of all features.
$ wp lw-zenadmin status
+-----------------+----------+
| feature | status |
+-----------------+----------+
| notices_enabled | enabled |
| widgets_enabled | enabled |
+-----------------+----------+wp lw-zenadmin enable <feature>
Enable a feature.
wp lw-zenadmin enable notices_enabled
wp lw-zenadmin enable widgets_enabledwp lw-zenadmin disable <feature>
Disable a feature.
wp lw-zenadmin disable notices_enabled
wp lw-zenadmin disable widgets_enabledWidget Management
wp lw-zenadmin widget list
List all discovered widgets and their visibility status.
$ wp lw-zenadmin widget list
+------------------------+-------------------+---------+-------------+
| widget_id | name | visible | group |
+------------------------+-------------------+---------+-------------+
| dashboard_right_now | At a Glance | yes | core |
| dashboard_activity | Activity | yes | core |
| dashboard_quick_press | Quick Draft | yes | core |
| dashboard_primary | WordPress Events | yes | core |
| dashboard_site_health | Site Health | yes | core |
| woocommerce_dashboard | WooCommerce Stats | yes | woocommerce |
| my_custom_widget | My Plugin Widget | no | third-party |
+------------------------+-------------------+---------+-------------+Supports --format=table (default), csv, json, yaml:
wp lw-zenadmin widget list --format=jsonwp lw-zenadmin widget show <widget_id>
Show a widget on the dashboard.
wp lw-zenadmin widget show dashboard_quick_press
# Success: Widget 'Quick Draft' (dashboard_quick_press) is now shown.wp lw-zenadmin widget hide <widget_id>
Hide a widget from the dashboard.
wp lw-zenadmin widget hide dashboard_primary
# Success: Widget 'WordPress Events' (dashboard_primary) is now hidden.wp lw-zenadmin widget show-all
Show all discovered widgets.
wp lw-zenadmin widget show-all
# Success: All widgets are now visible.wp lw-zenadmin widget hide-all
Hide all widgets from the dashboard.
wp lw-zenadmin widget hide-all
# Success: All widgets are now hidden.wp lw-zenadmin widget reset
Reset widget visibility to defaults (Core + WooCommerce visible, Third-party hidden).
wp lw-zenadmin widget reset
# Success: Widget visibility reset to defaults.Menu Management
wp lw-zenadmin menu list
List all discovered admin menu items and their visibility.
$ wp lw-zenadmin menu list
+---------------------+-----------+---------+-------------+-----------+
| slug | name | visible | group | protected |
+---------------------+-----------+---------+-------------+-----------+
| index.php | Dashboard | yes | core | yes |
| edit.php | Posts | yes | core | no |
| tools.php | Tools | yes | core | no |
+---------------------+-----------+---------+-------------+-----------+Supports --format=table (default), csv, json, yaml.
wp lw-zenadmin menu show <slug>
Show a menu item in the admin sidebar.
wp lw-zenadmin menu show tools.php
# Success: Menu 'Tools' (tools.php) is now shown.wp lw-zenadmin menu hide <slug>
Hide a menu item from the admin sidebar. Protected menus cannot be hidden.
wp lw-zenadmin menu hide tools.php
# Success: Menu 'Tools' (tools.php) is now hidden.wp lw-zenadmin menu show-all
Show all menu items.
wp lw-zenadmin menu show-all
# Success: All menu items are now visible.wp lw-zenadmin menu hide-all
Hide all non-protected menu items.
wp lw-zenadmin menu hide-all
# Success: All non-protected menu items are now hidden.wp lw-zenadmin menu reset
Reset menu visibility to defaults (all visible).
wp lw-zenadmin menu reset
# Success: Menu visibility reset to defaults (all visible).CLI Notes
widget listonly shows widgets after the Dashboard page has been visited at least once in the browser (auto-discovery).menu listonly shows menus after the admin has been visited at least once in the browser (auto-discovery).- Use
widget list/menu listto look up IDs forshowandhidecommands. widget reset/menu resetdeletes saved settings and falls back to built-in defaults.
Hooks Reference
Actions
| Hook | Priority | Class | Purpose |
|---|---|---|---|
plugins_loaded | 10 | lw-zenadmin.php | Plugin initialization |
init | 10 | Plugin | Load textdomain |
admin_menu | 10 | SettingsPage | Register menu page |
admin_init | 10 | SettingsSaver | Handle form submission |
admin_enqueue_scripts | 10 | SettingsPage | Enqueue admin CSS/JS (settings page only) |
admin_enqueue_scripts | 10 | NoticeCollector | Enqueue panel CSS/JS (all admin pages) |
admin_bar_menu | 999 | NoticeCollector | Add “Notices” button to admin bar |
admin_head | -9999 | NoticeCollector | Early CSS to hide notices before JS loads |
admin_footer | 10 | NoticePanel | Render sidebar panel HTML |
wp_dashboard_setup | 999 | WidgetManager | Filter dashboard widgets |
admin_menu | 9999 | MenuManager | Discover and filter admin menus |
wp_before_admin_bar_render | 9999 | AdminBarManager | Discover and filter admin bar nodes |
admin_head | 10 | NoticeManager | Isolate notices on LW plugin pages |
admin_notices | -9999 | NoticeManager | Open notice wrapper div |
admin_notices | PHP_INT_MAX | NoticeManager | Close notice wrapper div |
Filters
| Hook | Class | Purpose |
|---|---|---|
admin_body_class | NoticeManager | Adds lw-plugins-admin-page body class |
Custom Action
| Hook | Location | Purpose |
|---|---|---|
lw_plugins_overview_cards | ParentPage::render() | Add extra plugin cards to the LW Plugins overview |
Database Options
| Option Name | Type | Description |
|---|---|---|
lw_zenadmin_options | array | Main settings (notices_enabled, widgets_enabled, menu_enabled, adminbar_enabled) |
lw_zenadmin_widget_settings | array|false | List of visible widget IDs, false if never saved |
lw_zenadmin_discovered_widgets | array | Auto-discovered widget ID to title map |
AI Abilities
When used with LW Site Manager, the following abilities are available for AI agents. All abilities require manage_options capability. These abilities are only active when LW Site Manager is also installed and activated - no hard dependency.
lw-zenadmin/get-options (readonly)
Get all global LW ZenAdmin settings.
Method: GET
curl -u "user:app-password" \
"https://example.com/wp-json/wp-abilities/v1/abilities/lw-zenadmin/get-options/run"Response:
{
"success": true,
"options": {
"notices_enabled": true,
"widgets_enabled": true,
"menu_enabled": false,
"adminbar_enabled": false
}
}Available options:
| Key | Type | Description |
|---|---|---|
notices_enabled | boolean | Enable admin notice collector sidebar |
widgets_enabled | boolean | Enable dashboard widget manager |
menu_enabled | boolean | Enable admin menu manager |
adminbar_enabled | boolean | Enable admin bar manager |
lw-zenadmin/set-options (write)
Update ZenAdmin settings. Only the provided keys are updated; others remain unchanged.
Method: POST
curl -u "user:app-password" \
-X POST -H "Content-Type: application/json" \
-d '{
"input": {
"options": {
"notices_enabled": true,
"widgets_enabled": false
}
}
}' \
"https://example.com/wp-json/wp-abilities/v1/abilities/lw-zenadmin/set-options/run"Response:
{
"success": true,
"message": "2 option(s) updated.",
"updated": ["notices_enabled", "widgets_enabled"]
}Valid keys: notices_enabled, widgets_enabled, menu_enabled, adminbar_enabled
lw-zenadmin/list-widgets (readonly)
List all discovered dashboard widgets along with their group and current visibility status. Widgets are only discoverable after the dashboard has been loaded at least once.
Method: GET
curl -u "user:app-password" \
"https://example.com/wp-json/wp-abilities/v1/abilities/lw-zenadmin/list-widgets/run"Response:
{
"success": true,
"widgets": [
{
"id": "dashboard_right_now",
"title": "At a Glance",
"group": "core",
"visible": true
},
{
"id": "dashboard_activity",
"title": "Activity",
"group": "core",
"visible": true
},
{
"id": "woocommerce_dashboard_status",
"title": "WooCommerce Status",
"group": "woocommerce",
"visible": true
},
{
"id": "my_custom_widget",
"title": "My Plugin Widget",
"group": "third-party",
"visible": false
}
]
}Widget groups:
| Group | Description |
|---|---|
core | WordPress core dashboard widgets |
woocommerce | WooCommerce dashboard widgets |
third-party | All other plugin/theme widgets |
Permissions
| Ability | Required capability |
|---|---|
lw-zenadmin/get-options | manage_options |
lw-zenadmin/set-options | manage_options |
lw-zenadmin/list-widgets | manage_options |
FAQ
Does this hide important notices?
No. All notices are still accessible via the admin bar button. They are simply moved from the page into a sidebar panel.
What happens to inline notices?
Inline notices (.inline, .below-h2) are left in place as WordPress intended.
Can I disable just one feature?
Yes. You can independently enable or disable the Notice Collector, Dashboard Widget Manager, Admin Bar Manager, and Admin Menu Manager from the settings page.