Skip to content

Commit

Permalink
Fix missing "Theme Showcase" sub menu item on Simple Classic site Cal…
Browse files Browse the repository at this point in the history
…yspo pages (#38698)
  • Loading branch information
DustyReagan authored Aug 5, 2024
1 parent b6abf9b commit 1d43aff
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Fix bug so Theme Showcase menu appears on Simple Classic sites
Original file line number Diff line number Diff line change
Expand Up @@ -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__ );
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 1d43aff

Please sign in to comment.