diff --git a/lib/compat/wordpress-6.7/block-bindings.php b/lib/compat/wordpress-6.7/block-bindings.php index 354200d536ea7..fe7ad62423752 100644 --- a/lib/compat/wordpress-6.7/block-bindings.php +++ b/lib/compat/wordpress-6.7/block-bindings.php @@ -15,22 +15,22 @@ */ function gutenberg_add_server_block_bindings_sources_to_editor_settings( $editor_settings ) { // Check if the sources are already exposed in the editor settings. - if ( isset( $editor_settings['blockBindings'] ) ) { + if ( isset( $editor_settings['blockBindingsSources'] ) ) { return $editor_settings; } $registered_block_bindings_sources = get_all_registered_block_bindings_sources(); if ( ! empty( $registered_block_bindings_sources ) ) { // Initialize array. - $editor_settings['blockBindings'] = array(); + $editor_settings['blockBindingsSources'] = array(); foreach ( $registered_block_bindings_sources as $source_name => $source_properties ) { // Add source with the label to editor settings. - $editor_settings['blockBindings'][ $source_name ] = array( + $editor_settings['blockBindingsSources'][ $source_name ] = array( 'label' => $source_properties->label, ); // Add `usesContext` property if exists. if ( ! empty( $source_properties->uses_context ) ) { - $editor_settings['blockBindings'][ $source_name ]['usesContext'] = $source_properties->uses_context; + $editor_settings['blockBindingsSources'][ $source_name ]['usesContext'] = $source_properties->uses_context; } } } diff --git a/packages/edit-post/src/index.js b/packages/edit-post/src/index.js index 3cca207830ef5..aa3473e6e55d4 100644 --- a/packages/edit-post/src/index.js +++ b/packages/edit-post/src/index.js @@ -88,7 +88,7 @@ export function initializeEditor( } registerCoreBlocks(); - bootstrapBlockBindingsSourcesFromServer( settings?.blockBindings ); + bootstrapBlockBindingsSourcesFromServer( settings?.blockBindingsSources ); registerCoreBlockBindingsSources(); registerLegacyWidgetBlock( { inserter: false } ); registerWidgetGroupBlock( { inserter: false } ); diff --git a/packages/edit-site/src/index.js b/packages/edit-site/src/index.js index 505ef753669f0..922e2f6ab933a 100644 --- a/packages/edit-site/src/index.js +++ b/packages/edit-site/src/index.js @@ -49,7 +49,7 @@ export function initializeEditor( id, settings ) { ( { name } ) => name !== 'core/freeform' ); registerCoreBlocks( coreBlocks ); - bootstrapBlockBindingsSourcesFromServer( settings?.blockBindings ); + bootstrapBlockBindingsSourcesFromServer( settings?.blockBindingsSources ); registerCoreBlockBindingsSources(); dispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' ); registerLegacyWidgetBlock( { inserter: false } );