From 4084114eabcbddced2fbd78fc12827c3f676675c Mon Sep 17 00:00:00 2001 From: gziolo Date: Fri, 23 Feb 2024 09:20:12 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@57700 git-svn-id: http://core.svn.wordpress.org/trunk@57201 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-block.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-wp-block.php b/wp-includes/class-wp-block.php index 8d11eba20d..60c026e0ac 100644 --- a/wp-includes/class-wp-block.php +++ b/wp-includes/class-wp-block.php @@ -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; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 1c446efed8..2ff3b40427 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-beta2-57699'; +$wp_version = '6.5-beta2-57700'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.