From 8f86e518f51dda84772879a9b3fc070724bf9696 Mon Sep 17 00:00:00 2001
From: Paul Biron <paul@sparrowhawkcomputing.com>
Date: Wed, 22 Dec 2021 16:31:44 -0700
Subject: [PATCH] Allow the Customize admin bar node to show on the front-end
 when using a block theme if any plugins use the Customizer.

---
 src/wp-includes/admin-bar.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/wp-includes/admin-bar.php b/src/wp-includes/admin-bar.php
index fa2017a501..18ca17b5fa 100644
--- a/src/wp-includes/admin-bar.php
+++ b/src/wp-includes/admin-bar.php
@@ -446,8 +446,8 @@ function wp_admin_bar_edit_site_menu( $wp_admin_bar ) {
 function wp_admin_bar_customize_menu( $wp_admin_bar ) {
 	global $wp_customize;
 
-	// Don't show if a block theme is activated.
-	if ( wp_is_block_theme() ) {
+	// Don't show if a block theme is activated and no plugins use the customizer.
+	if ( wp_is_block_theme() && ! has_action( 'customize_register' ) ) {
 		return;
 	}
 
-- 
2.30.2.windows.1

