wp/wp-includes/class-wp-customize-widgets.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
--- a/wp/wp-includes/class-wp-customize-widgets.php	Fri Sep 05 18:40:08 2025 +0200
+++ b/wp/wp-includes/class-wp-customize-widgets.php	Fri Sep 05 18:52:52 2025 +0200
@@ -733,7 +733,10 @@
 				<p class="description">{description}</p>
 				<ul class="widget-area-select">
 					<% _.each( sidebars, function ( sidebar ){ %>
-						<li class="" data-id="<%- sidebar.id %>" title="<%- sidebar.description %>" tabindex="0"><%- sidebar.name %></li>
+						<li class="" data-id="<%- sidebar.id %>" tabindex="0">
+							<div><strong><%- sidebar.name %></strong></div>
+							<div><%- sidebar.description %></div>
+						</li>
 					<% }); %>
 				</ul>
 				<div class="move-widget-actions">
@@ -866,6 +869,24 @@
 				'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');'
 			);
 
+			// Preload server-registered block bindings sources.
+			$registered_sources = get_all_registered_block_bindings_sources();
+			if ( ! empty( $registered_sources ) ) {
+				$filtered_sources = array();
+				foreach ( $registered_sources as $source ) {
+					$filtered_sources[] = array(
+						'name'        => $source->name,
+						'label'       => $source->label,
+						'usesContext' => $source->uses_context,
+					);
+				}
+				$script = sprintf( 'for ( const source of %s ) { wp.blocks.registerBlockBindingsSource( source ); }', wp_json_encode( $filtered_sources ) );
+				wp_add_inline_script(
+					'wp-blocks',
+					$script
+				);
+			}
+
 			wp_add_inline_script(
 				'wp-blocks',
 				sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( $block_editor_context ) ) ),