mirror of
git://develop.git.wordpress.org/
synced 2025-02-23 08:03:41 +01:00
Editor: Add id to the supported Image's binding attributes
Syncs changes from the Gutenberg plugin: https://github.com/WordPress/gutenberg/pull/59194. Fixes #60577. Props kevin940726, ankit-k-gupta, sonali844, harshalkadu, gziolo. git-svn-id: https://develop.svn.wordpress.org/trunk@57700 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
367157bb35
commit
f720cdc942
@ -236,7 +236,7 @@ class WP_Block {
|
||||
$supported_block_attributes = array(
|
||||
'core/paragraph' => array( 'content' ),
|
||||
'core/heading' => array( 'content' ),
|
||||
'core/image' => array( 'url', 'title', 'alt' ),
|
||||
'core/image' => array( 'id', 'url', 'title', 'alt' ),
|
||||
'core/button' => array( 'url', 'text', 'linkTarget', 'rel' ),
|
||||
);
|
||||
|
||||
@ -289,7 +289,7 @@ class WP_Block {
|
||||
*/
|
||||
private function replace_html( string $block_content, string $attribute_name, $source_value ) {
|
||||
$block_type = $this->block_type;
|
||||
if ( ! isset( $block_type->attributes[ $attribute_name ] ) ) {
|
||||
if ( ! isset( $block_type->attributes[ $attribute_name ]['source'] ) ) {
|
||||
return $block_content;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user