Skip to content

Commit 12b6750

Browse files
authored
do not overwrite $image_ids (#500)
to include post thumbnail also for block-parser.
1 parent 1ef984d commit 12b6750

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

includes/transformer/class-post.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ protected function get_attachments() {
229229
if ( $max_images > 0 ) {
230230
// first try to get images that are actually in the post content
231231
if ( site_supports_blocks() && \has_blocks( $this->wp_post->post_content ) ) {
232-
$image_ids = $this->get_block_image_ids( $max_images, $image_ids );
232+
$block_image_ids = $this->get_block_image_ids( $max_images, $image_ids );
233+
$image_ids = \array_merge( $image_ids, $block_image_ids );
233234
} else {
234235
// fallback to images attached to the post
235236
$query = new \WP_Query(

0 commit comments

Comments
 (0)