Skip to content

Commit

Permalink
do not overwrite $image_ids (#500)
Browse files Browse the repository at this point in the history
to include post thumbnail also for block-parser.
  • Loading branch information
pfefferle authored Oct 10, 2023
1 parent 1ef984d commit 12b6750
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/transformer/class-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ protected function get_attachments() {
if ( $max_images > 0 ) {
// first try to get images that are actually in the post content
if ( site_supports_blocks() && \has_blocks( $this->wp_post->post_content ) ) {
$image_ids = $this->get_block_image_ids( $max_images, $image_ids );
$block_image_ids = $this->get_block_image_ids( $max_images, $image_ids );
$image_ids = \array_merge( $image_ids, $block_image_ids );
} else {
// fallback to images attached to the post
$query = new \WP_Query(
Expand Down

0 comments on commit 12b6750

Please sign in to comment.