SSP Documentation
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.
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.
How It Works
- The editor reads the live $menu and $submenu arrays and mirrors them into the UI.
- Your edits serialize into an internal matrix and save to option ssp_admin_menu_matrix_v343.
- Outside the editor page, the plugin applies that matrix to the real menu: reorders tops, moves subs, hides items, injects labeled separators, etc.
- Most actions update the left menu immediately while you edit, via a safe DOM mirror (no page reload needed).
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.
Key | top_order: string[] — desired top-level order (including optional separators). |
---|---|
Never hidden | The 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” }
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-level | top_hidden: string[] |
---|---|
Submenus | subs_hidden: string[] |
Safety | Slug 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.
Key | park: { [slug: string]: { where: “top”|”sub”, parent: string, index: number, title: string } } |
---|---|
Behavior | Unhiding 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.
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.
Option | ssp_admin_menu_matrix_v343 |
---|---|
AJAX | action=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
- Open Admin Menu Organizer.
- Click + Add Separator, name it “Content”, and drag it above Posts. Toggle Show separators on.
- Hide Tools; confirm it appears in Hidden-Parent-Menu-Items and disappears from the left menu.
- Open WooCommerce → Submenus and hide Status. Confirm it appears in Hidden-Sub-Menu-Items.
- Move Plugins under Tools (as a submenu) to confirm top→sub demotion works. Then restore it to top-level.
- Click Save. Reload the admin screen in a new tab and verify your layout persists.
- Click Reset to Default WP Menu and confirm everything returns to the default ordering.