Skip to content

Commit

Permalink
Editor: Expand Block Bindings for button block.
Browse files Browse the repository at this point in the history
Add block bindings support for the linkTarget and rel button block attributes.
This allows using custom fiends or pattern overrides for these attributes.

Props glendaviesnz.
Fixes #60481.

git-svn-id: https://develop.svn.wordpress.org/trunk@57576 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
youknowriad committed Feb 9, 2024
1 parent acad00e commit b194cd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private function process_block_bindings() {
'core/paragraph' => array( 'content' ),
'core/heading' => array( 'content' ),
'core/image' => array( 'url', 'title', 'alt' ),
'core/button' => array( 'url', 'text' ),
'core/button' => array( 'url', 'text', 'linkTarget', 'rel' ),
);

// If the block doesn't have the bindings property, isn't one of the allowed
Expand Down

0 comments on commit b194cd1

Please sign in to comment.