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

Media & Text: Correctly reset the 'useFeaturedImage' attribute #68247

Merged

Conversation

SH4LIN
Copy link
Contributor

@SH4LIN SH4LIN commented Dec 23, 2024

What?

Fixes #68246.

This PR will fix the issue where the useFeaturedImage flag is not reset when other media is selected in the Media Text block.

Why?

  • This issue was causing featured image and other selected media displayed on the frontend

How?

  • This PR will reset useFeaturedImage to false once any other media is selected

Testing Instructions

  1. Add media text block select the useFeaturedImage
  2. Check the frontend
  3. Select other media for the media text block and check the frontend it shouldn't show double media

Screenshots or screencast

Copy link

github-actions bot commented Dec 23, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: SH4LIN <sh4lin@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Block] Media & Text Affects the Media & Text Block labels Dec 24, 2024
@Mamaduka
Copy link
Member

@SH4LIN, please use reserved keywords to link PRs and issues.

It would make it easier for folks to discover your PRs.

@Mamaduka Mamaduka changed the title fix: resetting useFeatured image to false whenever media is selected Media & Text: Correctly reset the 'useFeaturedImage' attribute Dec 24, 2024
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.

Thanks for contributing, @SH4LIN!

@Mamaduka Mamaduka merged commit 58a72af into WordPress:trunk Dec 24, 2024
68 of 70 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.0 milestone Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Media & Text Affects the Media & Text Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Core media text block issue with the useFeaturedImage
2 participants