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

Only use the post-title if the featured image is a link #41775

Merged
merged 1 commit into from
Jun 17, 2022
Merged

Conversation

aristath
Copy link
Member

What?

Fixes #40999

Why?

If the featured image is not a link, then the image's alt text should be used instead of the post-title.

How?

By setting the 3rd arg of the get_the_post_thumbnail() call to an empty array if isLink is not true.

Testing Instructions

Instructions in #40999

@aristath aristath added the [Type] Bug An existing feature does not function as intended label Jun 17, 2022
@aristath aristath requested a review from ajitbohra as a code owner June 17, 2022 07:21
@Mamaduka Mamaduka added the [Block] Post Featured Image Affects the Post Featured Image Block label Jun 17, 2022
@Mamaduka Mamaduka self-requested a review June 17, 2022 09:19
Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

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

Works as expected. Thanks, Ari.

@aristath aristath merged commit c6b5c9a into trunk Jun 17, 2022
@aristath aristath deleted the fix/40999 branch June 17, 2022 12:15
@github-actions github-actions bot added this to the Gutenberg 13.6 milestone Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Featured Image Affects the Post Featured Image Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Post Featured Image block: Alt text from media library is not returned
2 participants