From 95c78a5c8a97dde3be3c5ee0da1f25b602a73364 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Mon, 15 Sep 2025 14:21:50 +0200 Subject: [PATCH] Block Bindings: Add block_bindings_supported_attributes filter --- src/wp-includes/class-wp-block.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/wp-includes/class-wp-block.php b/src/wp-includes/class-wp-block.php index e2b75f66431f8..f0c9956ebfe7c 100644 --- a/src/wp-includes/class-wp-block.php +++ b/src/wp-includes/class-wp-block.php @@ -301,6 +301,20 @@ private function process_block_bindings() { self::BLOCK_BINDINGS_SUPPORTED_ATTRIBUTES[ $block_type ] ?? array(); + /** + * Filters the supported block attributes for block bindings. + * + * @since 6.9.0 + * + * @param string[] $supported_block_attributes The block's attributes that are supported by block bindings. + * @param string $block_type The block type whose attributes are being filtered. + */ + $supported_block_attributes = apply_filters( + 'block_bindings_supported_attributes', + $supported_block_attributes, + $block_type + ); + /** * Filters the supported block attributes for block bindings. *