When they search, make sure they find you!

How It Works

This section explains the technical behavior behind ID Dashboard Cleanup — how widgets are captured, how settings are stored, and how the plugin enforces its configuration across all users.

Widget Capture

Dashboard widgets in WordPress are registered during the wp_dashboard_setup action. The plugin hooks into this action at a very late priority (9998) to capture every registered widget — including those from themes and other plugins.

On each Dashboard page load, the plugin scans the global $wp_meta_boxes['dashboard'] array and stores every widget’s ID, title, original column (context), and priority. This list is saved in two places:

  • A transient that refreshes every 24 hours (ensures the list stays current)
  • A persistent option as a fallback (ensures the settings page works even if the transient expires)

Hiding Widgets

At priority 9999 (one tick after capture), the plugin calls remove_meta_box() for every widget in the hidden list. This completely removes hidden widgets from the dashboard — they don’t appear in Screen Options and can’t be toggled back by users.

Ordering Widgets

WordPress stores each user’s widget order in the meta-box-order_dashboard user option. The plugin intercepts this with the get_user_option_meta-box-order_dashboard filter and replaces the per-user order with the site-wide order from the plugin settings.

Column Count

Similarly, WordPress stores the dashboard column count in the screen_layout_dashboard user option. The plugin intercepts this with the get_user_option_screen_layout_dashboard filter and returns the configured column count for all users.

Data Storage

All plugin settings are stored in a single WordPress option: iddc_settings. This option contains:

  • hidden — Array of widget IDs that should be hidden.
  • columns — Integer (2, 3, or 4) for the dashboard column count.
  • order — Associative array with keys normal, side, column3, and column4, each containing a comma-separated list of widget IDs in order.

Uninstalling

If you deactivate the plugin, all dashboard widgets return to their default WordPress behavior — users regain control of their own Screen Options. The plugin’s settings (iddc_settings, transient, and fallback option) remain in the database so they’re preserved if you reactivate.