From 8cc9e53847f8a46258d9e42c29f8d524ec0af592 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Sat, 26 Feb 2022 08:27:50 +0000 Subject: [PATCH] Themes: Remove the Live Preview link when installing a block theme from a zip archive. This changeset removes the Live Preview link for block-based themes when installing for a zip archive, since the customizer is disabled by default for block themes. Follow-up to [52353]. Props alanjacobmathew, hellofromTonya, antonvlasenko, ironprogrammer. Fixes #54578. git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52803 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-theme-installer-skin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-theme-installer-skin.php b/src/wp-admin/includes/class-theme-installer-skin.php index 46d4c22d8c..4c140ba66e 100644 --- a/src/wp-admin/includes/class-theme-installer-skin.php +++ b/src/wp-admin/includes/class-theme-installer-skin.php @@ -115,7 +115,7 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin { $install_actions = array(); - if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { + if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) && ! $theme_info->is_block_theme() ) { $customize_url = add_query_arg( array( 'theme' => urlencode( $stylesheet ),