do not overwrite $image_ids (#500)
to include post thumbnail also for block-parser.
This commit is contained in:
parent
1ef984da6c
commit
12b6750c94
1 changed files with 2 additions and 1 deletions
|
@ -229,7 +229,8 @@ class Post {
|
||||||
if ( $max_images > 0 ) {
|
if ( $max_images > 0 ) {
|
||||||
// first try to get images that are actually in the post content
|
// first try to get images that are actually in the post content
|
||||||
if ( site_supports_blocks() && \has_blocks( $this->wp_post->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 {
|
} else {
|
||||||
// fallback to images attached to the post
|
// fallback to images attached to the post
|
||||||
$query = new \WP_Query(
|
$query = new \WP_Query(
|
||||||
|
|
Loading…
Reference in a new issue