Make WordPress Core

Changeset 45964


Ignore:
Timestamp:
09/04/2019 04:45:58 PM (5 years ago)
Author:
afercia
Message:

Bundled Theme: Twenty Nineteen: Use human-friendly color names.

For better accessibility, the Primary and Secondary theme colors have now more understandable names.
Changes the names "Primary" and "Secondary" to "Blue" and "Dark Blue". Fallbacks to the hex color codes when the theme is set to use a custom Primary color.

Props kjellr, aduth, audrasjb.
Fixes #46698.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentynineteen/functions.php

    r45768 r45964  
    144144            array(
    145145                array(
    146                     'name'  => __( 'Primary', 'twentynineteen' ),
     146                    'name'  => 'default' === get_theme_mod( 'primary_color' ) ? __( 'Blue', 'twentynineteen' ) : null,
    147147                    'slug'  => 'primary',
    148148                    'color' => twentynineteen_hsl_hex( 'default' === get_theme_mod( 'primary_color' ) ? 199 : get_theme_mod( 'primary_color_hue', 199 ), 100, 33 ),
    149149                ),
    150150                array(
    151                     'name'  => __( 'Secondary', 'twentynineteen' ),
     151                    'name'  => 'default' === get_theme_mod( 'primary_color' ) ? __( 'Dark Blue', 'twentynineteen' ) : null,
    152152                    'slug'  => 'secondary',
    153153                    'color' => twentynineteen_hsl_hex( 'default' === get_theme_mod( 'primary_color' ) ? 199 : get_theme_mod( 'primary_color_hue', 199 ), 100, 23 ),
Note: See TracChangeset for help on using the changeset viewer.