Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Update the colorscheme function to set the hue correctly #512
The color scheme customizer function currently takes in a string, either "default" or "custom" as it's 'to' argument, but tries to set the hue to that actual value. This PR updates that to grab the current custom hue or use the default hue instead based on the to value passed in, fixes #468
Ideally, we could pull the default hue from somewhere without hardcoding it, but I couldn't find anywhere that it was stored. I thought "wp.customize.settings.values.colorscheme_primary_hue" might work, but that was just the last saved value, not the true default, so I hard coded it.
(Wordpress.org username is also brentswisher)