From 5f023aeddee44f4db3476f206d6b0e4083094b68 Mon Sep 17 00:00:00 2001 From: Paul Von Schrottky Date: Mon, 15 Mar 2021 16:22:29 -0300 Subject: [PATCH] Hide classic option on Simple sites On Simple WP.com sites, we no longer show the option to switch to classic. This is part of the classic deprecation/removal project. --- .../Gutenberg/GutenbergViewController+MoreActions.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController+MoreActions.swift b/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController+MoreActions.swift index aa196afd8334..9d92aecd3265 100644 --- a/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController+MoreActions.swift +++ b/WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController+MoreActions.swift @@ -27,8 +27,12 @@ extension GutenbergViewController { } } - alert.addDefaultActionWithTitle(MoreSheetAlert.classicTitle) { [unowned self] _ in - self.savePostEditsAndSwitchToAztec() + // Only add the action if the site is not a Simple WP.com site + let isSimpleWPComSite = !post.blog.isAtomic() && post.blog.isHostedAtWPcom + if !isSimpleWPComSite { + alert.addDefaultActionWithTitle(MoreSheetAlert.classicTitle) { [unowned self] _ in + self.savePostEditsAndSwitchToAztec() + } } let toggleModeTitle: String = {