@@ -235,21 +235,26 @@ private function process_block_bindings() {
235
235
236
236
$ computed_attributes = array ();
237
237
238
- $ allowed_blocks = WP_Block_Bindings_Registry::get_instance ()->allowed_blocks ;
238
+ $ supported_blocks = array (
239
+ 'core/paragraph ' => array ( 'content ' ),
240
+ 'core/heading ' => array ( 'content ' ),
241
+ 'core/image ' => array ( 'url ' , 'title ' , 'alt ' ),
242
+ 'core/button ' => array ( 'url ' , 'text ' , 'linkTarget ' , 'rel ' ),
243
+ );
239
244
240
- // If the block doesn't have the bindings property, isn't one of the allowed
245
+ // If the block doesn't have the bindings property, isn't one of the supported
241
246
// block types, or the bindings property is not an array, return the block content.
242
247
if (
243
- ! isset ( $ allowed_blocks [ $ this ->name ] ) ||
248
+ ! isset ( $ supported_blocks [ $ this ->name ] ) ||
244
249
empty ( $ parsed_block ['attrs ' ]['metadata ' ]['bindings ' ] ) ||
245
250
! is_array ( $ parsed_block ['attrs ' ]['metadata ' ]['bindings ' ] )
246
251
) {
247
252
return $ computed_attributes ;
248
253
}
249
254
250
255
foreach ( $ parsed_block ['attrs ' ]['metadata ' ]['bindings ' ] as $ attribute_name => $ block_binding ) {
251
- // If the attribute is not in the allowed list, process next attribute.
252
- if ( ! in_array ( $ attribute_name , $ allowed_blocks [ $ this ->name ], true ) ) {
256
+ // If the attribute is not in the supported list, process next attribute.
257
+ if ( ! in_array ( $ attribute_name , $ supported_blocks [ $ this ->name ], true ) ) {
253
258
continue ;
254
259
}
255
260
// If no source is provided, or that source is not registered, process next attribute.
0 commit comments