Skip to content

Commit

Permalink
remove additional contexts from block.json
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinan committed Jan 4, 2023
1 parent fb1e4c1 commit 0b7f3b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions packages/block-library/src/post-featured-image/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@
"type": "string"
},
"title": {
"type": "string",
"source": "attribute",
"selector": "img",
"attribute": "title",
"__experimentalRole": "content"
"type": "string"
}
},
"usesContext": [ "postId", "postType", "queryId" ],
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/post-featured-image/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ) );
Expand Down

0 comments on commit 0b7f3b3

Please sign in to comment.