-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix merge algorithm for global styles #24294
Conversation
Size Change: 0 B Total Size: 1.16 MB ℹ️ View Unchanged
|
$result[ $block_name ][ $subtree ] = array_merge( | ||
$core[ $block_name ][ $subtree ], | ||
$theme[ $block_name ][ $subtree ], | ||
$user[ $block_name ][ $subtree ] | ||
); | ||
} | ||
foreach ( array_keys( $core[ $block_name ]['styles'] ) as $subtree ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we expect the "core" styles to always contain all the keys?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the current implementation, yes, as they all are normalized before being merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Extracted from #24250
This fixes the merge algorithm for global styles.
Before:
After: