Make WordPress Core

Changes between Initial Version and Version 2 of Ticket #62069


Ignore:
Timestamp:
09/18/2024 10:09:53 AM (8 months ago)
Author:
talldanwp
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #62069 – Description

    initial v2  
    2424}}}
    2525
    26 In the gutenberg plugin these individual bindings are assigned back to the block before rendering so that the block can reason about which individual attributes are bound:
     26In the gutenberg plugin this updated bindings metadata is assigned back to the block before rendering so that the block can reason about which individual attributes are bound:
    2727https://github.com/WordPress/gutenberg/blob/98b8d415830fa9ebf7b4b0a2b95d65b9fd1e813a/lib/compat/wordpress-6.6/blocks.php#L40
    2828
    29 This allows blocks like the image block to check whether an individual attribute, like `id` has a binding:
     29This allows blocks like the image block to check whether an individual attribute, like `id`, has a binding:
    3030https://github.com/WordPress/gutenberg/blob/98b8d415830fa9ebf7b4b0a2b95d65b9fd1e813a/packages/block-library/src/image/index.php#L31
    3131
    32 Unfortunately core doesn't have the same logic to assign the individual bindings back to the block before rendering, which means the image block's logic fails. Any block that renders just receives the individual `__default` binding.
     32Unfortunately, WordPress core doesn't have the same logic to assign the updated binding metadata back to the block before rendering, which means the image block's logic fails. The block only receives the individual __default binding in its metadata.
    3333