Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing "Theme Showcase" sub menu item on Simple Classic site Calyspo pages #38698

Merged
merged 2 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading