From 0e41b5d52fdc6af6442816b5f465c9db9f84e126 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 19 Sep 2024 06:51:18 +0200 Subject: Adding upstream version 6.6.1+dfsg1. Signed-off-by: Daniel Baumann --- wp-includes/class-wp-customize-manager.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'wp-includes/class-wp-customize-manager.php') diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index baad9fe..8efcfc1 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -100,7 +100,7 @@ final class WP_Customize_Manager { * @since 4.5.0 * @var array */ - protected $components = array( 'widgets', 'nav_menus' ); + protected $components = array( 'nav_menus' ); /** * Registered instances of WP_Customize_Section. @@ -286,6 +286,11 @@ final class WP_Customize_Manager { $args['messenger_channel'] = sanitize_key( wp_unslash( $_REQUEST['customize_messenger_channel'] ) ); } + // Do not load 'widgets' component if a block theme is activated. + if ( ! wp_is_block_theme() ) { + $this->components[] = 'widgets'; + } + $this->original_stylesheet = get_stylesheet(); $this->theme = wp_get_theme( 0 === validate_file( $args['theme'] ) ? $args['theme'] : null ); $this->messenger_channel = $args['messenger_channel']; @@ -5695,7 +5700,7 @@ final class WP_Customize_Manager { $section_description .= __( 'Add your own CSS code here to customize the appearance and layout of your site.' ); $section_description .= sprintf( ' %2$s %3$s', - esc_url( __( 'https://wordpress.org/documentation/article/css/' ) ), + esc_url( __( 'https://developer.wordpress.org/advanced-administration/wordpress/css/' ) ), __( 'Learn more about CSS' ), /* translators: Hidden accessibility text. */ __( '(opens in a new tab)' ) -- cgit v1.2.3