diff --git a/projects/packages/jetpack-mu-wpcom/changelog/add-wpcom-difm-functions b/projects/packages/jetpack-mu-wpcom/changelog/add-wpcom-difm-functions new file mode 100644 index 0000000000000..82bc442049813 --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/add-wpcom-difm-functions @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Adds DIFM-specific functionality for WoA sites diff --git a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php index 2d90701c8e3f1..b02683face54c 100644 --- a/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php +++ b/projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php @@ -110,6 +110,7 @@ public static function load_features() { require_once __DIR__ . '/features/wpcom-admin-dashboard/wpcom-admin-dashboard.php'; require_once __DIR__ . '/features/wpcom-block-editor/class-jetpack-wpcom-block-editor.php'; require_once __DIR__ . '/features/wpcom-block-editor/functions.editor-type.php'; + require_once __DIR__ . '/features/wpcom-difm/class-wpcom-difm-express.php'; require_once __DIR__ . '/features/wpcom-logout/wpcom-logout.php'; require_once __DIR__ . '/features/wpcom-themes/wpcom-theme-fixes.php'; diff --git a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-difm/class-wpcom-difm-express.php b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-difm/class-wpcom-difm-express.php new file mode 100644 index 0000000000000..68c47ef98b524 --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-difm/class-wpcom-difm-express.php @@ -0,0 +1,145 @@ + $submenu_items ) { + if ( $parent_slug === $wpcom_hosting_menu_slug ) { + foreach ( $submenu_items as $submenu_item ) { + if ( self::should_remove_submenu( $submenu_item[2] ) ) { + remove_submenu_page( $parent_slug, $submenu_item[2] ); + } + } + } + } + } + } + + /** + * Hide dashboard content if the DIFM sticker is active. + */ + public static function hide_dashboard_content() { + echo ''; + } + + /** + * Show an admin notice if the DIFM sticker is active. + */ + public static function show_difm_admin_notice() { + ?> +
+ Site Build in Progress +

+

+ +

Contact Support if you have any questions.', 'jetpack-mu-wpcom' ), 'mailto:services+express@wordpress.com' ) ); ?>

+
+