Skip to content

Commit

Permalink
Cover: Avoid adding empty background image URL (#49477)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka authored Mar 30, 2023
1 parent 0e2b16a commit dfdfaa3
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

1 comment on commit dfdfaa3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in dfdfaa3.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4565094222
📝 Reported issues:

Please sign in to comment.