From e89229886bfd1f976121a4a71e3bfdb4c6cadf1a Mon Sep 17 00:00:00 2001 From: audrasjb Date: Sat, 26 Feb 2022 08:16:02 +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. Built from https://develop.svn.wordpress.org/trunk@52802 git-svn-id: http://core.svn.wordpress.org/trunk@52391 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-theme-installer-skin.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-theme-installer-skin.php b/wp-admin/includes/class-theme-installer-skin.php index 91c3a50088..cfbc8a6ecb 100644 --- a/wp-admin/includes/class-theme-installer-skin.php +++ b/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 ), diff --git a/wp-includes/version.php b/wp-includes/version.php index e530d4d3d0..7c0678ee2f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-52801'; +$wp_version = '6.0-alpha-52802'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.