Changeset 58798 for trunk/src/wp-includes/block-editor.php
- Timestamp:
- 07/24/2024 10:57:27 AM (17 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/block-editor.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-editor.php
r58703 r58798 647 647 if ( isset( $post_content_block_attributes ) ) { 648 648 $editor_settings['postContentAttributes'] = $post_content_block_attributes; 649 } 650 651 // Expose block bindings sources in the editor settings. 652 $registered_block_bindings_sources = get_all_registered_block_bindings_sources(); 653 if ( ! empty( $registered_block_bindings_sources ) ) { 654 // Initialize array. 655 $editor_settings['blockBindingsSources'] = array(); 656 foreach ( $registered_block_bindings_sources as $source_name => $source_properties ) { 657 // Add source with the label to editor settings. 658 $editor_settings['blockBindingsSources'][ $source_name ] = array( 659 'label' => $source_properties->label, 660 ); 661 // Add `usesContext` property if exists. 662 if ( ! empty( $source_properties->uses_context ) ) { 663 $editor_settings['blockBindingsSources'][ $source_name ]['usesContext'] = $source_properties->uses_context; 664 } 665 } 649 666 } 650 667
Note: See TracChangeset
for help on using the changeset viewer.