Skip to Content
PluginsLW ZenAdmin

LW ZenAdmin

Clean up your WordPress admin - notices sidebar, dashboard widgets, admin menu, and admin bar manager.

Overview

Requires WordPress6.0+
Requires PHP8.1+
Tested up to6.7
LicenseGPL-2.0-or-later
GitHublwplugins/lw-zenadmin 

Installation

composer require lwplugins/lw-zenadmin

Or 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.

OptionDefaultDescription
notices_enabledtrueEnable/disable the notice collector
widgets_enabledtrueEnable/disable the widget manager
menu_enabledfalseEnable/disable the admin menu manager
adminbar_enabledfalseEnable/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_enabled

wp lw-zenadmin disable <feature>

Disable a feature.

wp lw-zenadmin disable notices_enabled wp lw-zenadmin disable widgets_enabled

Widget 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=json

wp 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.

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 list only shows widgets after the Dashboard page has been visited at least once in the browser (auto-discovery).
  • menu list only shows menus after the admin has been visited at least once in the browser (auto-discovery).
  • Use widget list / menu list to look up IDs for show and hide commands.
  • widget reset / menu reset deletes saved settings and falls back to built-in defaults.

Hooks Reference

Actions

HookPriorityClassPurpose
plugins_loaded10lw-zenadmin.phpPlugin initialization
init10PluginLoad textdomain
admin_menu10SettingsPageRegister menu page
admin_init10SettingsSaverHandle form submission
admin_enqueue_scripts10SettingsPageEnqueue admin CSS/JS (settings page only)
admin_enqueue_scripts10NoticeCollectorEnqueue panel CSS/JS (all admin pages)
admin_bar_menu999NoticeCollectorAdd “Notices” button to admin bar
admin_head-9999NoticeCollectorEarly CSS to hide notices before JS loads
admin_footer10NoticePanelRender sidebar panel HTML
wp_dashboard_setup999WidgetManagerFilter dashboard widgets
admin_menu9999MenuManagerDiscover and filter admin menus
wp_before_admin_bar_render9999AdminBarManagerDiscover and filter admin bar nodes
admin_head10NoticeManagerIsolate notices on LW plugin pages
admin_notices-9999NoticeManagerOpen notice wrapper div
admin_noticesPHP_INT_MAXNoticeManagerClose notice wrapper div

Filters

HookClassPurpose
admin_body_classNoticeManagerAdds lw-plugins-admin-page body class

Custom Action

HookLocationPurpose
lw_plugins_overview_cardsParentPage::render()Add extra plugin cards to the LW Plugins overview

Database Options

Option NameTypeDescription
lw_zenadmin_optionsarrayMain settings (notices_enabled, widgets_enabled, menu_enabled, adminbar_enabled)
lw_zenadmin_widget_settingsarray|falseList of visible widget IDs, false if never saved
lw_zenadmin_discovered_widgetsarrayAuto-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:

KeyTypeDescription
notices_enabledbooleanEnable admin notice collector sidebar
widgets_enabledbooleanEnable dashboard widget manager
menu_enabledbooleanEnable admin menu manager
adminbar_enabledbooleanEnable 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:

GroupDescription
coreWordPress core dashboard widgets
woocommerceWooCommerce dashboard widgets
third-partyAll other plugin/theme widgets

Permissions

AbilityRequired capability
lw-zenadmin/get-optionsmanage_options
lw-zenadmin/set-optionsmanage_options
lw-zenadmin/list-widgetsmanage_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.