WP Admin Menu Organizer Documentation

SSP — Admin Menu Organizer (Docs)

SSP Documentation

SSP WP Admin Organizer

Overview

WP Admin Organizer gives you a live, 1:1 view of the WordPress left admin menu.

  • Reorder top-level items.
  • Move items into submenus, reorder subs, and hide specific subs.
  • Insert labeled separators with custom colors.
  • Hide/Unhide items (tops and subs), with a dedicated Hidden panel.
  • One-click Reset to Default WP Menu.
  • Changes apply live to the actual left menu while you edit.
Compatibility: Designed for WP 5.6+ and PHP 5.6/7.x/8.x. Licenses are checked via your site’s ssp_license_gate() if present.

Admin Screen

The plugin adds a top-level menu Admin Menu Organizer (slug ssp-admin-menu-reorder). The page shows a three-column layout:

Admin Menu (Left)

  • List of visible top-level items in current order.
  • Each row shows the item title, a Hide/Unhide control, and a submenu toggle.
  • Separator rows include editable name and colors.

Tools Palette (Center)

  • Fixed floating palette: Up, Down, Add Separator, Show separators, Save, Reset to Default WP Menu.
  • Some tools require a selection (row highlighted).

Hidden (Right)

  • Hidden-Parent-Menu-Items: top-level items you’ve hidden.
  • Hidden-Sub-Menu-Items: submenus you’ve hidden.
  • Unhide from here, or move hidden subs directly back under a parent.
Note: You can’t hide this plugin’s own top-level menu for safety.

How It Works

  1. The editor reads the live $menu and $submenu arrays and mirrors them into the UI.
  2. Your edits serialize into an internal matrix and save to option ssp_admin_menu_matrix_v343.
  3. Outside the editor page, the plugin applies that matrix to the real menu: reorders tops, moves subs, hides items, injects labeled separators, etc.
  4. Most actions update the left menu immediately while you edit, via a safe DOM mirror (no page reload needed).
Matrix keys: top_order, top_hidden, subs{parent: {order:[]}}, subs_hidden, park, sep_labels, sep_styles, sep_global, top_labels.
Editor safety: While you’re on the organizer page, it doesn’t modify the live arrays that feed its own lists. That way, hidden items still appear in the editor to be managed.

Top-Level Ordering

Drag or use Up/Down to reorder. The order is stored in top_order. Behavior:

  • Unknown/future slugs not in your saved list fall to the end (so new plugins still appear).
  • collapse-menu and generated separators (slugs beginning separator-ssp-) are special markers.
  • top_labels records label fallbacks to help match items by name when slugs change.
Keytop_order: string[] — desired top-level order (including optional separators).
Never hiddenThe plugin’s own slug ssp-admin-menu-reorder is protected.

Separators

Add a top-level separator with + Add Separator. Each separator has a unique slug like separator-ssp-169… and can be renamed and colored.

Visibility

  • Master toggle Show separators sets sep_global (on/off).
  • Separators obey your top_order placement, and render only when sep_global = 1.

Styling

  • sep_labels[slug] = “Name”
  • sep_styles[slug] = { line: “#hex”, text: “#hex” }
Note: WP’s native wp-menu-separator rows are hidden while sep_global is on; your labeled separators take their place.

Hide / Unhide

Use the Hide button on any visible top-level (except this plugin’s own) to move it to the Hidden-Parent list. Use Unhide there to bring it back. For submenus, use Hide in the Submenus panel; they will appear in Hidden-Sub.

Top-leveltop_hidden: string[]
Submenussubs_hidden: string[]
SafetySlug ssp-admin-menu-reorder is auto-filtered from top_hidden to avoid locking yourself out.

Parking & Restore

When you hide or move items, their last known position is remembered so you can restore them near where they were.

Keypark: { [slug: string]: { where: “top”|”sub”, parent: string, index: number, title: string } }
BehaviorUnhiding a top-level tries to place it back near its index. Unhiding a submenu places it under the stored parent and index if available.

Live Left-Menu Mirror

As you edit, the plugin applies your matrix to the actual left admin menu in real time (DOM-side). You can immediately see the effect of reorders, hides, and separators without reloading.

  • Special slugs normalized for consistency (e.g., wc-admin paths, wc-settings tabs, edit.php?post_type= items).
  • Empty submenus are stripped to avoid blank flyouts.
  • Native separators are suppressed while custom separators are enabled.
Tip: Label matching helps continuity if a plugin renames a menu label; your saved order can still align.

Saving & Reset

Autosave

  • Edits are autosaved to ssp_admin_menu_matrix_v343 after a short delay.
  • Manual Save is also available on the palette.

Reset

  • Reset to Default WP Menu clears the matrix (keeps the option key, resets to empty defaults).
  • After reset, the left admin menu returns to vanilla WordPress ordering.
Optionssp_admin_menu_matrix_v343
AJAXaction=ssp_amr_save, action=ssp_amr_reset, with nonce protection.

Troubleshooting

My changes don’t appear in the left menu
  • Confirm you’re not on the organizer page’s first load state; make a small change to trigger the live mirror.
  • Ensure Show separators is on if you expect labeled separators to render.
  • Some third-party menus render late; try toggling a row or clicking Save to force a refresh.
I lost an item after hiding it
  • Check the right column: Hidden-Parent-Menu-Items or Hidden-Sub-Menu-Items.
  • Use Unhide to restore. The plugin uses park data to place it sensibly.
Submenu order won’t stick
  • Some plugins dynamically rebuild submenus. The live mirror will re-apply, but saving ensures persistence across page loads.
Can’t hide the organizer’s own menu

Intentional safety guard. The slug ssp-admin-menu-reorder is filtered from top_hidden.

WooCommerce screens don’t line up
  • WooCommerce slugs are normalized (e.g., wc-admin path segments, wc-settings&tab=…), so keep an eye on the normalized forms when comparing.

Test / Verification

  1. Open Admin Menu Organizer.
  2. Click + Add Separator, name it “Content”, and drag it above Posts. Toggle Show separators on.
  3. Hide Tools; confirm it appears in Hidden-Parent-Menu-Items and disappears from the left menu.
  4. Open WooCommerce → Submenus and hide Status. Confirm it appears in Hidden-Sub-Menu-Items.
  5. Move Plugins under Tools (as a submenu) to confirm top→sub demotion works. Then restore it to top-level.
  6. Click Save. Reload the admin screen in a new tab and verify your layout persists.
  7. Click Reset to Default WP Menu and confirm everything returns to the default ordering.
Tip: If another plugin adds items after your save, they will appear at the end; drag them where you want and save again.