Skip to content

Make the Reprint screen the plugin's one menu entry - #7

Merged
fredrikekelund merged 17 commits into
trunkfrom
add/admin-screens
Sep 23, 2026
Merged

fredrikekelund merged 17 commits into
trunkfrom
add/admin-screens

Conversation

@fredrikekelund

@fredrikekelund fredrikekelund commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Why

Reprint is the new default method for migrating the site. While we are keeping the BlogVault code around for a while longer, users should not see both screens, or they will get confused. There should be a single admin page accessible from the sidebar (same as how the plugin worked before). That screen should focus only on Reprint setup, and we should reuse the good parts of the old admin screen design.

Remove the blue "Let us migrate your site for free" box on the BlogVault screen, since the new migration flow is self-serve and we no longer offer a 50% discount on hosting when users migrate.

What

  1. The old screen leaves the sidebar, but still loads at wp-admin/admin.php?page=wpcom-migration. The Reprint screen becomes the plugin's one menu entry, Migrate to WordPress.com. The plugin row's Settings link and the activation redirect go there too.
  2. The Reprint screen takes the old screen's design, minus the BlogVault mark and the free-migration card, with the connection controls where the email form was. Each mode is one sentence saying where the site stands, and notices sit at the top.
  3. The manual and debugging controls move to their own screen, Set up Reprint manually, at admin.php?page=wpcom-migration-manual. They are the export secret, the exporter toggle, the export URL, the blog ID and a new Remove secret link. Nothing links to it.

Hidden screens are registered and then taken out of the menu, so their URLs keep working. That includes the Reprint screen on whitelabelled installs and on network subsites. On a network the old screen keeps its network-admin menu entry, since Reprint is single-site only.

Label Screenshot
Legacy BlogVault screen. Now accessible only via URL: wp-admin/admin.php?page=wpcom-migration 00-legacy
New default plugin screen. Unconfigured 01-empty
New default plugin screen. Reprint key added (WPCOM adds the key automatically if the user approves an application password) 02-reprint-key-added
New default plugin screen. Reprint exporter enabled (WPCOM enables it when the migration starts) 03-exporter-enabled
New default plugin screen. User clicked "Log in with WordPress.com" and finished the login process. 04-wpcom-connected
The plugins debug screen. Accessible only via URL: admin.php?page=wpcom-migration-manual 05-manual-setup

Checks

Build, PHPCS, PHPCompatibility and the Playground e2e suite all pass locally. That includes new menu and multisite scenarios, and E2E_SCENARIOS now runs a subset of scenarios. I also checked the screens by hand on a test site.

🤖 Generated with Claude Code

fredrikekelund and others added 17 commits September 23, 2026 13:28
Seven Playground boots is too slow a loop for iterating on one screen.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The old screen registers as before and is then removed from the menu
global, which leaves it rendering at admin.php?page=wpcom-migration with
its hook suffix intact. A new e2e scenario asserts that rather than
trusting a reading of core.

The connection scenario's own menu assertion is updated to match: it
checked the Reprint screen's old submenu row under the BlogVault
top-level slug, which no longer exists now that the screen owns a
top-level row of its own.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
mainUrl() stays put: siteInfoTags() posts it to the app as adminurl,
where it still means the old screen.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The secret form, the exporter toggle, the export URL and the blog ID
leave the migration screen for admin.php?page=wpcom-migration-manual,
which nothing links to.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The branded layout has one fixed heading, so the per-mode headings go
and their sentences have to say where the site stands on their own.
tests/e2e/connection-steps.php gets the matching copy updates so the
whole suite stays green.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
One centred column, the WordPress mark alone in the header, the serif
heading, and the connection controls where the email form was. The
screen owns its stylesheet rather than borrowing the old screen's,
which goes when that screen does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Manual_Page::add_admin_menu() removed its own submenu row inside
admin_menu, before admin.php can scan $submenu to find the page's
parent. That left the by-hand screen unreachable by URL, refused with
a 403. Move the removal to a new hide_submenu(), hooked on
admin_enqueue_scripts at priority 1, after admin.php has authorized
the request and resolved its render hook, but before the WP 6.9+
command palette reads $submenu at priority 10.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Every hidden case now registers the screen and then takes its row out of
$menu, so a whitelabelled brand no longer 403s the Reprint screen and the
URLs Connect_Page, the Settings link and the activation redirect use.

On a network the old screen keeps its network-admin row and is where the
Settings link and the activation redirect lead; subsites get no row.
Screens taken out of $menu set their own <title>.

The menu e2e drives the real whitelabel path, checks titles and prints
step failures; a new multisite scenario runs through run-blueprint.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The account's email is what people recognise; the login often isn't.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Notices render above the page, where wp-admin puts them, rather than
between the intro and the mode's sentence.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A Remove secret button discards the secret and closes the export
window, the same cleanup deactivation and disconnect run. An empty
secret field still means "nothing entered", not "delete".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@fredrikekelund
fredrikekelund merged commit c27ceb9 into trunk Sep 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant