[wp-trac] [WordPress Trac] #46698: Twenty Nineteen: use better color names for the editor palette
WordPress Trac
noreply at wordpress.org
Tue Apr 30 12:47:16 UTC 2019
#46698: Twenty Nineteen: use better color names for the editor palette
-----------------------------------------+--------------------------------
Reporter: afercia | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.3
Component: Bundled Theme | Version:
Severity: normal | Resolution:
Keywords: has-screenshots needs-patch | Focuses: ui, accessibility
-----------------------------------------+--------------------------------
Comment (by aduth):
Replying to [comment:11 afercia]:
> Looking at what Twenty Nineteen does, see
> https://core.trac.wordpress.org/browser/trunk/src/wp-
content/themes/twentynineteen/functions.php?rev=44382&marks=145-154#L141
>
> I'm not sure how a theme can ''not'' provide a name for a custom color,
given the default values need a name. Instead, when users set a ''custom
value'' via the hue picker, we can't predict the color name. I'm wondering
if there's a way to make ''custom values'' fallback to the hex code.
Similar to the conditional assignment of the `'color'` property, I could
imagine assigning `null` as the `'name'` when it's not the default.
{{{
'name' => in_array( array( false, 'default' ), get_theme_mod(
'primary_color' ) ) ? 'Blue' : null,
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46698#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list