Skip to content

Image block: remove duplicate data-wp-bind--srcset in the lightbox overlay#79202

Merged
westonruter merged 1 commit into
WordPress:trunkfrom
lonesahilnazir:remove-duplicate-line
Jun 16, 2026
Merged

Image block: remove duplicate data-wp-bind--srcset in the lightbox overlay#79202
westonruter merged 1 commit into
WordPress:trunkfrom
lonesahilnazir:remove-duplicate-line

Conversation

@lonesahilnazir

Copy link
Copy Markdown
Contributor

What?

Closes #79200

Removes a duplicate data-wp-bind--srcset="state.enlargedSrcset" attribute declaration from the enlarged <img> element in block_core_image_print_lightbox_overlay().

Why?

The enlarged <img> in block_core_image_print_lightbox_overlay() declares data-wp-bind--srcset="state.enlargedSrcset" twice. While this does not affect functionality, the duplicate attribute is redundant and can be removed to improve code clarity and maintainability.

How?

Removes the duplicate data-wp-bind--srcset attribute from the enlarged <img> element, leaving a single declaration in place. No functional changes are introduced.

Screenshots or screencast

Not applicable. This is a code cleanup with no visual changes.

Use of AI Tools

ChatGPT was used to help draft the PR description. All code changes were reviewed and validated by the author.

…erlay

The enlarged <img> in block_core_image_print_lightbox_overlay() declares data-wp-bind--srcset="state.enlargedSrcset" twice. Removes the duplicate (no behavior change).
@github-actions

Copy link
Copy Markdown

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: lonesahilnazir <[email protected]>

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

@github-actions github-actions Bot added [Package] Block library /packages/block-library First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository labels Jun 15, 2026
@github-actions

Copy link
Copy Markdown

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @lonesahilnazir! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@westonruter westonruter added the [Type] Bug An existing feature does not function as intended label Jun 16, 2026
@westonruter westonruter merged commit 51ef9ec into WordPress:trunk Jun 16, 2026
53 of 56 checks passed
@github-actions github-actions Bot added this to the Gutenberg 23.5 milestone Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Package] Block library /packages/block-library [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicate data-wp-bind--srcset="state.enlargedSrcset" in wp-includes/blocks/image.php

2 participants