- Timestamp:
- 09/23/2024 12:33:14 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-block-bindings-registry.php
r58395 r59080 190 190 $this->sources[ $source_name ] = $source; 191 191 192 // Adds `uses_context` defined by block bindings sources.193 add_filter(194 'get_block_type_uses_context',195 function ( $uses_context, $block_type ) use ( $source ) {196 if ( ! in_array( $block_type->name, $this->supported_blocks, true ) || empty( $source->uses_context ) ) {197 return $uses_context;198 }199 // Use array_values to reset the array keys.200 return array_values( array_unique( array_merge( $uses_context, $source->uses_context ) ) );201 },202 10,203 2204 );205 206 192 return $source; 207 193 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)