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

Blocks: Align with Gutenberg the name of generated asset handle for core blocks #820

Closed
wants to merge 3 commits into from
Closed

Blocks: Align with Gutenberg the name of generated asset handle for core blocks #820

wants to merge 3 commits into from

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented Dec 16, 2020

Trac ticket: https://core.trac.wordpress.org/ticket/50328

Related Gutenberg PR: WordPress/gutenberg#25220.

This change tries to align with the latest changes added by @aristath to the Gutenberg project. As part of styles splitting for core blocks, there was a special pattern introduced for how style handles are named. Ideally, we would apply it to all blocks but there might be some backward compatibility considerations so I left the handling for non-core blocks unchanged.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Copy link
Member

@aristath aristath left a comment

Choose a reason for hiding this comment

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

The code makes sense. Tested it and it works as expected 👍
Nitpicking: Yoda conditions as per the Coding Standfards

src/wp-includes/blocks.php Outdated Show resolved Hide resolved
src/wp-includes/blocks.php Outdated Show resolved Hide resolved
gziolo and others added 2 commits December 16, 2020 14:49
Co-authored-by: Ari Stathopoulos <aristath@gmail.com>
Co-authored-by: Ari Stathopoulos <aristath@gmail.com>
Copy link
Member

@aristath aristath left a comment

Choose a reason for hiding this comment

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

Thank you for the changes! LGTM 👍

@gziolo gziolo closed this Dec 21, 2020
@gziolo gziolo deleted the update/generate-asset-handle-name branch December 21, 2020 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants