diff --git a/src/wp-includes/admin-bar.php b/src/wp-includes/admin-bar.php index ba85e1f1ae..6eca9d05b6 100644 --- a/src/wp-includes/admin-bar.php +++ b/src/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 );