From ad15f6422f9ff926e90ad346a0994ecc1349c246 Mon Sep 17 00:00:00 2001 From: noisysocks Date: Thu, 11 Nov 2021 04:47:02 +0000 Subject: [PATCH] Hide Customize from admin bar when using a block theme Don't add the Customize link to the admin bar when a block theme is activated. See #54337. Built from https://develop.svn.wordpress.org/trunk@52134 git-svn-id: http://core.svn.wordpress.org/trunk@51726 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/admin-bar.php | 5 +++++ wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index ba85e1f1ae..6eca9d05b6 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -431,6 +431,11 @@ function wp_admin_bar_customize_menu( $wp_admin_bar ) { return; } + // Don't show if a block theme is activated. + if ( wp_is_block_template_theme() ) { + return; + } + $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; if ( is_customize_preview() && $wp_customize->changeset_uuid() ) { $current_url = remove_query_arg( 'customize_changeset_uuid', $current_url ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 11715fdffc..a7a2122b6f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-52133'; +$wp_version = '5.9-alpha-52134'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.