Make WordPress Core

Ticket #54683: 54683.diff

File 54683.diff, 1002 bytes (added by pbiron, 4 years ago)
  • src/wp-includes/admin-bar.php

    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 b function wp_admin_bar_edit_site_menu( $wp_admin_bar ) { 
    446446function wp_admin_bar_customize_menu( $wp_admin_bar ) {
    447447        global $wp_customize;
    448448
    449         // Don't show if a block theme is activated.
    450         if ( wp_is_block_theme() ) {
     449        // Don't show if a block theme is activated and no plugins use the customizer.
     450        if ( wp_is_block_theme() && ! has_action( 'customize_register' ) ) {
    451451                return;
    452452        }
    453453