Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
5c037c5
mu-wpcom: Add a Protect page offering Scan on WordPress.com sites
jboland88 Oct 6, 2026
b24cf71
mu-wpcom: Use feature-neutral eligibility copy
jboland88 Oct 6, 2026
b6f2e42
Jetpack: Keep the admin menu order test independent of host-registere…
jboland88 Oct 6, 2026
3dab85e
mu-wpcom: Test the hosting feature pages' plan checks
jboland88 Oct 6, 2026
af9c124
mu-wpcom: Return to the feature page when checkout's cart is emptied
jboland88 Oct 7, 2026
bf0a586
mu-wpcom: Land Scan on Calypso once live, and tighten transfer checks
jboland88 Oct 7, 2026
eacb161
mu-wpcom: Address review feedback on hosting feature pages
jboland88 Oct 7, 2026
7957c8d
mu-wpcom: Fix checkout back button from hosting feature pages
jboland88 Oct 8, 2026
eeab7ee
mu-wpcom: Use AdminPage for hosting feature pages
jboland88 Oct 8, 2026
736b890
Merge remote-tracking branch 'origin/trunk' into add/mu-wpcom-scan-page
jboland88 Oct 9, 2026
42a6be0
mu-wpcom: Keep hosting feature card at its natural height
jboland88 Oct 9, 2026
3ced922
Merge remote-tracking branch 'origin/trunk' into add/mu-wpcom-scan-page
kraftbj Oct 15, 2026
a98876e
mu-wpcom: Run hosting feature page tests in separate processes
kraftbj Oct 15, 2026
512d517
mu-wpcom: Match the Scan route's WordPress package versions to the Ba…
kraftbj Oct 15, 2026
5804536
Merge remote-tracking branch 'origin/trunk' into add/mu-wpcom-scan-page
kraftbj Oct 20, 2026
2525167
Merge remote-tracking branch 'origin/trunk' into add/mu-wpcom-scan-page
jboland88 Oct 20, 2026
12acb58
mu-wpcom: Read the wp-build page priority from its owning base class
jboland88 Oct 20, 2026
7aa9395
mu-wpcom: Leave the Backup menu entry to the WordPress.com menu
jboland88 Oct 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: added

Add a Protect page to wp-admin on WordPress.com sites, offering an upgrade or activation for sites where Protect is not available yet. Registered but not linked from the menu.
3 changes: 2 additions & 1 deletion projects/packages/jetpack-mu-wpcom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@
"handlePrefix": "jetpack-mu-wpcom",
"pages": [
"site-setup",
"wpcom-backup"
"wpcom-backup",
"wpcom-scan"
]
}
}
18 changes: 18 additions & 0 deletions projects/packages/jetpack-mu-wpcom/routes/wpcom-scan/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "1.0.0",
"private": true,
"dependencies": {
"@automattic/jetpack-components": "workspace:*",
"@types/react": "^18.3.28",
"@wordpress/admin-ui": "2.12.0",
"@wordpress/element": "9.0.0",
"@wordpress/i18n": "6.30.0",
"@wordpress/icons": "18.0.0",
"@wordpress/primitives": "4.57.0",
"@wordpress/ui": "0.24.0"
},
"route": {
"path": "/",
"page": "wpcom-scan"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { App } from '../../src/features/wpcom-scan/js/app.tsx';
import './style.scss';

// The wp-build route entry; state comes from PHP, so there is no provider to mount.
const Stage = () => {
return <App />;
};

export { Stage as stage };
10 changes: 10 additions & 0 deletions projects/packages/jetpack-mu-wpcom/routes/wpcom-scan/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Route-level styles for the Protect page. The layout mixin is
// included per route because each wp-build route bundles its own CSS.

@use "@automattic/jetpack-base-styles/admin-page-layout" as *;

// Scoped to the body class so the layout cannot leak onto other Jetpack pages.
body.jetpack_page_jetpack-protect {

@include jetpack-admin-page-layout-wp-build;
}
14 changes: 12 additions & 2 deletions projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ public static function init() {
add_action( 'plugins_loaded', array( __CLASS__, 'load_wpcom_random_redirect' ) );
}

// The Backup page serves both platforms: it offers the transfer on Simple
// and the plan upgrade on WoA, and steps aside once backups are live.
// The Backup and Protect pages serve both platforms: they offer the transfer on Simple
// and the plan upgrade on WoA, and step aside once the feature is live.
if ( ( defined( 'IS_WPCOM' ) && IS_WPCOM ) || Constants::is_true( 'IS_ATOMIC' ) ) {
add_action( 'plugins_loaded', array( __CLASS__, 'load_wpcom_backup' ) );
add_action( 'plugins_loaded', array( __CLASS__, 'load_wpcom_scan' ) );
}

// At mu-plugin scope, because the Jetpack plugin resolves this filter at the earliest plugins_loaded priority.
Expand Down Expand Up @@ -900,6 +901,15 @@ public static function load_wpcom_backup() {
require_once __DIR__ . '/features/wpcom-backup/wpcom-backup.php';
}

/**
* Load the Protect page, which offers Scan, on WordPress.com Simple and WoA sites.
*
* The file hooks its own `init`, where the plan lookup it gates on is ready.
*/
public static function load_wpcom_scan() {
require_once __DIR__ . '/features/wpcom-scan/wpcom-scan.php';
}

/**
* Load Odyssey Stats in Simple sites.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,63 @@
import JetpackFooter from '@automattic/jetpack-components/jetpack-footer';
import JetpackLogo from '@automattic/jetpack-components/jetpack-logo';
import { Page } from '@wordpress/admin-ui';
import { __ } from '@wordpress/i18n';
import { ActivateScreen, InProgressScreen, UpgradeScreen } from './screens.tsx';
import { getInitialState } from './state.ts';
import './style.scss';
import { backup } from '@wordpress/icons';
import { useMemo } from 'react';
import { HostingFeaturePage } from '../../wpcom-hosting-feature-page/js/page.tsx';
import { backupsCalloutIllustration } from './illustration.ts';
import type { FeatureConfig } from '../../wpcom-hosting-feature-page/js/types.ts';

const PRODUCT_NAME = 'VaultPress Backup'; // Product name; do not translate.
/**
* The Backup page's copy, imagery and Tracks IDs.
*
* @return The config.
*/
function getBackupConfig(): FeatureConfig {
return {
productName: 'VaultPress Backup', // Product name; do not translate.
subTitle: __( 'Save changes and restore quickly with one-click recovery.', 'jetpack-mu-wpcom' ),
icon: backup,
illustration: backupsCalloutIllustration,
tracksFeatureId: 'site-backups',
tracksPath: '/wp-admin/admin.php?page=jetpack-backup',
upgrade: {
title: __( 'Secure your content with Jetpack Backups', 'jetpack-mu-wpcom' ),
description: __(
'Protect your site with scheduled and real-time backups—giving you the ultimate “undo” button and peace of mind that your content is always safe.',
'jetpack-mu-wpcom'
),
},
activate: {
title: __( 'Activate backups for this site', 'jetpack-mu-wpcom' ),
description: __(
'Your plan includes backups. To switch them on, your site needs to move to our hosting platform.',
'jetpack-mu-wpcom'
),
action: __( 'Activate backups', 'jetpack-mu-wpcom' ),
},
inProgress: {
title: __( 'Setting up backups', 'jetpack-mu-wpcom' ),
description: __(
'Your site is being moved to our hosting platform so backups can be switched on.',
'jetpack-mu-wpcom'
),
},
modal: {
blockedTitle: __( 'Backups cannot be activated', 'jetpack-mu-wpcom' ),
intro: __(
'To turn Jetpack VaultPress Backup on, we’ll need to move your site over to WordPress.com’s advanced managed cloud hosting.',
'jetpack-mu-wpcom'
),
holdsHeading: __( 'To activate backups you’ll need to:', 'jetpack-mu-wpcom' ),
},
};
}

/**
* The Backup page for WordPress.com Simple and WoA sites.
*
* Shown while backups are out of reach: a Simple site shares a multisite install
* and cannot be backed up, and a WoA site may not have bought them yet.
*
* @return The rendered page.
*/
export function App() {
const initialState = getInitialState();
const config = useMemo( getBackupConfig, [] );

return (
<Page
className="wpcom-backup jp-admin-page"
visual={ <JetpackLogo showText={ false } height={ 20 } /> }
title={ PRODUCT_NAME }
ariaLabel={ PRODUCT_NAME }
subTitle={ __(
'Save changes and restore quickly with one-click recovery.',
'jetpack-mu-wpcom'
) }
hasPadding={ false }
>
<div className="wpcom-backup__body">
{ initialState.state === 'in_progress' && <InProgressScreen /> }
{ initialState.state === 'activate' && <ActivateScreen state={ initialState } /> }
{ initialState.state === 'upgrade' && <UpgradeScreen state={ initialState } /> }
</div>
<JetpackFooter />
</Page>
);
return <HostingFeaturePage config={ config } />;
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "jetpack-js-tools/tsconfig.base.json",
"compilerOptions": {
"lib": [ "ES2022", "DOM", "DOM.Iterable" ]
},
// `strictNullChecks` would be useful here, but `app.tsx` imports
// @automattic/jetpack-components, whose source is not written for it and
// reports ~30 errors under it. Turn it on only once that package can take it.
"extends": "../wpcom-hosting-feature-page/tsconfig.json",
"include": [ "js/**/*" ]
}
Loading
Loading