Skip to content

Use wp_unique_id() instead of uniqid() in block_core_gallery_render()#39983

Merged
Mamaduka merged 1 commit intotrunkfrom
update/unique-id-function-in-gallery-block
Apr 3, 2022
Merged

Use wp_unique_id() instead of uniqid() in block_core_gallery_render()#39983
Mamaduka merged 1 commit intotrunkfrom
update/unique-id-function-in-gallery-block

Conversation

@westonruter
Copy link
Copy Markdown
Member

This is amends #38164.

Fixes #38889.

Previously #38891.

What?

Why?

How?

Testing Instructions

Screenshots or screencast

Copy link
Copy Markdown
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

Good catch 👍

Do you think it is something we could programmatically enforce in the future?

@gziolo gziolo added [Type] Code Quality Issues or PRs that relate to code quality [Block] Gallery Affects the Gallery Block - used to display groups of images labels Apr 2, 2022
@Mamaduka Mamaduka merged commit 090ec5a into trunk Apr 3, 2022
@Mamaduka Mamaduka deleted the update/unique-id-function-in-gallery-block branch April 3, 2022 07:02
@github-actions github-actions bot added this to the Gutenberg 13.0 milestone Apr 3, 2022
@westonruter
Copy link
Copy Markdown
Member Author

Do you think it is something we could programmatically enforce in the future?

A custom PHPCS ruleset would do it, although that may be overkill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Gallery Affects the Gallery Block - used to display groups of images [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use of uniqid() in generated CSS class names breaks ability to cache parsed CSS

3 participants