From a1fd37e4130a4c631df89daa40d65987d6806568 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Wed, 4 Sep 2019 16:45:58 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@45964 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentynineteen/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentynineteen/functions.php b/src/wp-content/themes/twentynineteen/functions.php index 91fad80756..901aa29990 100644 --- a/src/wp-content/themes/twentynineteen/functions.php +++ b/src/wp-content/themes/twentynineteen/functions.php @@ -143,12 +143,12 @@ if ( ! function_exists( 'twentynineteen_setup' ) ) : 'editor-color-palette', array( array( - 'name' => __( 'Primary', 'twentynineteen' ), + 'name' => 'default' === get_theme_mod( 'primary_color' ) ? __( 'Blue', 'twentynineteen' ) : null, 'slug' => 'primary', 'color' => twentynineteen_hsl_hex( 'default' === get_theme_mod( 'primary_color' ) ? 199 : get_theme_mod( 'primary_color_hue', 199 ), 100, 33 ), ), array( - 'name' => __( 'Secondary', 'twentynineteen' ), + 'name' => 'default' === get_theme_mod( 'primary_color' ) ? __( 'Dark Blue', 'twentynineteen' ) : null, 'slug' => 'secondary', 'color' => twentynineteen_hsl_hex( 'default' === get_theme_mod( 'primary_color' ) ? 199 : get_theme_mod( 'primary_color_hue', 199 ), 100, 23 ), ),