From 6d7dd31236e64ad7219cec96c46d5de6eb7d3e96 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 7 Oct 2022 20:48:12 +0000 Subject: [PATCH] Customize: Prevent PHP notice in Customizer when using block theme. Use the `customize_panel_active` filter to deactivate the Menus panel instead of overriding the `check_capabilities` method. This ensures the panel remains registered but is still hidden. See #54888. Fixes #54905. Built from https://develop.svn.wordpress.org/trunk@54419 git-svn-id: http://core.svn.wordpress.org/trunk@53978 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../class-wp-customize-nav-menus-panel.php | 23 ------------------- wp-includes/theme.php | 19 +++++++++++++++ wp-includes/version.php | 2 +- 3 files changed, 20 insertions(+), 24 deletions(-) diff --git a/wp-includes/customize/class-wp-customize-nav-menus-panel.php b/wp-includes/customize/class-wp-customize-nav-menus-panel.php index 18328e5d3f..c0d098bc7d 100644 --- a/wp-includes/customize/class-wp-customize-nav-menus-panel.php +++ b/wp-includes/customize/class-wp-customize-nav-menus-panel.php @@ -98,27 +98,4 @@ class WP_Customize_Nav_Menus_Panel extends WP_Customize_Panel {
  • id && + ! current_theme_supports( 'menus' ) && + ! current_theme_supports( 'widgets' ) + ) { + $active = false; + } + return $active; + }, + 10, + 2 + ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index b9a6be59ce..53e30d3c53 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-beta3-54418'; +$wp_version = '6.1-beta3-54419'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.