Fix: Allow themes to disable the color and gradients palette.#32225
Closed
jorgefilipecosta wants to merge 1 commit intotrunkfrom
Closed
Fix: Allow themes to disable the color and gradients palette.#32225jorgefilipecosta wants to merge 1 commit intotrunkfrom
jorgefilipecosta wants to merge 1 commit intotrunkfrom
Conversation
|
Size Change: 0 B Total Size: 1.86 MB ℹ️ View Unchanged
|
This was referenced May 26, 2021
Member
|
This would also fix #32027 (added to the issue description so it auto-closes the issue when this lands). |
aristath
approved these changes
Jun 3, 2021
| foreach ( $to_append as $path_to_append ) { | ||
| $path = array_merge( $metadata['path'], $path_to_append ); | ||
| $incoming_node = _wp_array_get( $incoming_data, $path, array() ); | ||
| $incoming_node = _wp_array_get( $incoming_data, $path, null ); |
Member
There was a problem hiding this comment.
I think we can simply remove the 3rd argument here... $default is already null in the function.
Suggested change
| $incoming_node = _wp_array_get( $incoming_data, $path, null ); | |
| $incoming_node = _wp_array_get( $incoming_data, $path ); |
Comment on lines
+1136
to
+1138
| // If we are merging with something that has no values | ||
| // core origin should be treated as if the values were present | ||
| // and we can remove the origin. |
Member
There was a problem hiding this comment.
I believe we no longer want to use we phrasing in inline docs...
Suggested change
| // If we are merging with something that has no values | |
| // core origin should be treated as if the values were present | |
| // and we can remove the origin. | |
| // If merging with something that has no values, | |
| // core origin should be treated as if the values were present | |
| // and the origin can be removed. |
Member
|
@jorgefilipecosta my understanding was that we were exploring #32358 as an alternative to this one? |
Member
Author
|
This PR is superseded by #32358. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #32027
This PR fixes a regression and now themes can disable again the color and gradients palette.
How has this been tested?
Using a thtme.json.
I did not configure any color palette and verified that the default core colors appear when the editor loads.
I set an empty color palette and verified the no color palette appears on the editor.
I repeated the test on theme without theme.json using the theme supports mechanism.