For the Image block, you can view its attributes via its block.json file. In the Properties dialog, change the 'Show as' dropdown from 'Bounding Box' to 'None'. It’s also necessary to understand what attributes are available for a block that you want to bind data to. For this or any other content control, click in the control and then click the Properties button on the Developer tab. This means you can do things like bind a custom URL to the Image block’s url attribute and text to the alt attribute with data from custom fields (post meta), site data, and even more. What the Block Bindings API does is let you “bind” dynamic data to the block’s attributes, which are then reflected in the final HTML markup that is output to the browser on the front end. Take a look at the markup for a basic Image block: The basic structure of a block and bindings It’s important to understand what the Block Bindings API is and why it’s so vital to the future of WordPress.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |