diff --git a/packages/block-library/src/post-featured-image/block.json b/packages/block-library/src/post-featured-image/block.json index 820b1b9769e316..2e1017fc784fe2 100644 --- a/packages/block-library/src/post-featured-image/block.json +++ b/packages/block-library/src/post-featured-image/block.json @@ -50,11 +50,7 @@ "type": "string" }, "title": { - "type": "string", - "source": "attribute", - "selector": "img", - "attribute": "title", - "__experimentalRole": "content" + "type": "string" } }, "usesContext": [ "postId", "postType", "queryId" ], diff --git a/packages/block-library/src/post-featured-image/index.php b/packages/block-library/src/post-featured-image/index.php index f727bc3e0560b9..6762c14fe7bf58 100644 --- a/packages/block-library/src/post-featured-image/index.php +++ b/packages/block-library/src/post-featured-image/index.php @@ -29,7 +29,7 @@ function render_block_core_post_featured_image( $attributes, $content, $block ) $size_slug = isset( $attributes['sizeSlug'] ) ? $attributes['sizeSlug'] : 'post-thumbnail'; $attr = get_block_core_post_featured_image_border_attributes( $attributes ); $overlay_markup = get_block_core_post_featured_image_overlay_element_markup( $attributes ); - $title = isset( $attributes['title'] ) && $attributes['title']; + $title = isset( $attributes['title'] ) ? $attributes['title'] : ''; if ( $is_link ) { $attr['alt'] = trim( strip_tags( get_the_title( $post_ID ) ) );