diff --git a/projects/packages/jetpack-mu-wpcom/changelog/fix-simple-theme-showcase-menu b/projects/packages/jetpack-mu-wpcom/changelog/fix-simple-theme-showcase-menu new file mode 100644 index 0000000000000..fa79431450512 --- /dev/null +++ b/projects/packages/jetpack-mu-wpcom/changelog/fix-simple-theme-showcase-menu @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fix bug so Theme Showcase menu appears on Simple Classic sites diff --git a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-themes/wpcom-themes.php b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-themes/wpcom-themes.php index f41d700df1a21..d8d25b497f141 100644 --- a/projects/packages/jetpack-mu-wpcom/src/features/wpcom-themes/wpcom-themes.php +++ b/projects/packages/jetpack-mu-wpcom/src/features/wpcom-themes/wpcom-themes.php @@ -9,14 +9,14 @@ use Automattic\Jetpack\Jetpack_Mu_Wpcom; -if ( get_option( 'wpcom_admin_interface' ) !== 'wp-admin' ) { - return; -} - /** * Displays a banner before the theme browser that links to the WP.com Theme Showcase. */ function wpcom_themes_show_banner() { + if ( get_option( 'wpcom_admin_interface' ) !== 'wp-admin' ) { + return; + } + $site_slug = wp_parse_url( home_url(), PHP_URL_HOST ); $wpcom_logo = plugins_url( 'images/wpcom-logo.svg', __FILE__ ); $background_image = plugins_url( 'images/banner-background.webp', __FILE__ ); @@ -56,6 +56,10 @@ function wpcom_themes_show_banner() { * Registers an "Appearance > Theme Showcase" menu. */ function wpcom_themes_add_theme_showcase_menu() { + if ( get_option( 'wpcom_admin_interface' ) !== 'wp-admin' ) { + return; + } + $site_slug = wp_parse_url( home_url(), PHP_URL_HOST ); add_submenu_page( 'themes.php',