Skip to content

Legacy setup-wizard registers a label-less submenu under Appearance (blank menu entry) #53

Description

@georgeolaru

Summary

The legacy setup wizard registers a label-less submenu under Appearance, so a blank/empty menu line appears under Appearance → (Themes, Editor, …, [blank], Install Plugins).

Root cause

admin/class-pixelgrade_assistant-setup_wizard.php:63

add_submenu_page( 'themes.php', '', '', 'manage_options', 'pixelgrade_assistant-setup-wizard', null );

Parenting the route to themes.php with empty title/menu-title makes WordPress render a blank submenu item. The wizard route is intentionally kept for compatibility — tests/admin-menu-retirement-test.php:111 pins the slug pixelgrade_assistant-setup-wizard as stable — so the goal is to keep the route reachable without the blank menu entry.

Fix

Register the route as a hidden page (e.g. add_submenu_page( null, … ), or unset it from $submenu after registration) so the slug stays valid for redirects/links but no empty line shows under Appearance. Keep the retirement test green (slug unchanged).

Repro

pixelgrade-integrated-check (http://localhost:8889) → Appearance submenu shows a blank entry between Fonts/Widgets and Install Plugins.

Severity

Minor / polish.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions