Skip to content

Commit

Permalink
Cover: Avoid adding empty background image URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Mar 30, 2023
1 parent 0e2b16a commit 694a107
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/block-library/src/cover/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ function render_block_core_cover( $attributes, $content ) {
update_post_thumbnail_cache();
}
$current_featured_image = get_the_post_thumbnail_url();
if ( ! $current_featured_image ) {
return $content;
}

$processor = new WP_HTML_Tag_Processor( $content );
$processor->next_tag();
Expand Down

0 comments on commit 694a107

Please sign in to comment.