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)

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/10242261937

Upstream-Ref: Automattic/jetpack@1d43aff
  • Loading branch information
fushar authored and matticbot committed Aug 5, 2024
1 parent 41548f0 commit 2fb2832
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 89 deletions.
58 changes: 29 additions & 29 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ This is an alpha version! The changes listed here are not final.
- Admin bar: fix icon alignment on small screen widths
- Adminbar: Fix profile menu colors
- Admin bar: help center and notification icons now follow color scheme
- Fix bug so Theme Showcase menu appears on Simple Classic sites
- Fix RTL admin bar
- Masterbar: Fix icon overlap issue at smaller resolutions
- MU WPCOM: Fix the option of the MailerLite widget is gone
Expand Down
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
Loading

0 comments on commit 2fb2832

Please sign in to comment.