Skip to content

Commit 8bc30c9

Browse files
committed
Block Bindings: Add block_bindings_supported_attributes filter.
Add a block-agnostic version of the `block_bindings_supported_attributes_{$block_type}` filter first introduced in [60611]. This allows adding block bindings support for attributes of multiple different blocks in one go. Follow-up to [60611]. Props bernhard-reiter. See #62090. git-svn-id: https://develop.svn.wordpress.org/trunk@60790 602fd350-edb4-49c9-b593-d223f7449a82
1 parent ebd415b commit 8bc30c9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/wp-includes/class-wp-block.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,20 @@ private function process_block_bindings() {
301301
self::BLOCK_BINDINGS_SUPPORTED_ATTRIBUTES[ $block_type ] ??
302302
array();
303303

304+
/**
305+
* Filters the supported block attributes for block bindings.
306+
*
307+
* @since 6.9.0
308+
*
309+
* @param string[] $supported_block_attributes The block's attributes that are supported by block bindings.
310+
* @param string $block_type The block type whose attributes are being filtered.
311+
*/
312+
$supported_block_attributes = apply_filters(
313+
'block_bindings_supported_attributes',
314+
$supported_block_attributes,
315+
$block_type
316+
);
317+
304318
/**
305319
* Filters the supported block attributes for block bindings.
306320
*

0 commit comments

Comments
 (0)