Skip to content

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

Merged
Mamaduka merged 1 commit intoWordPress:trunkfrom
SH4LIN:fix/media-text-use-featured-image-conflict
Dec 24, 2024
Merged

Media & Text: Correctly reset the 'useFeaturedImage' attribute#68247
Mamaduka merged 1 commit intoWordPress:trunkfrom
SH4LIN:fix/media-text-use-featured-image-conflict

Conversation

@SH4LIN
Copy link
Copy Markdown
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

@github-actions
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
@github-actions github-actions bot added this to the Gutenberg 20.0 milestone Dec 24, 2024
Gulamdastgir-Momin pushed a commit to Gulamdastgir-Momin/gutenberg that referenced this pull request Jan 23, 2025
…ress#68247)


Co-authored-by: SH4LIN <sh4lin@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
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