Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that post thumbnail is cached in post template block. #40572

Merged
merged 4 commits into from
May 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Default value.
  • Loading branch information
spacedmonkey committed May 5, 2022
commit 18a25c66e3e9174958d56c892dd68341a9060048
1 change: 1 addition & 0 deletions packages/block-library/src/post-template/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
function block_core_post_template_uses_feature_image( $inner_blocks ) {
$inner_blocks_array = iterator_to_array( $inner_blocks );
spacedmonkey marked this conversation as resolved.
Show resolved Hide resolved
$has_thumbnail = false;
foreach ( $inner_blocks_array as $block ) {
if ( 'core/post-featured-image' === $block->name ) {
$has_thumbnail = true;
spacedmonkey marked this conversation as resolved.
Show resolved Hide resolved
Expand Down