From 2e50e8753e613f69ebbc7356afc4312a01d27b10 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 18 Dec 2018 22:08:33 +0000 Subject: [PATCH] Twenty Nineteen: Code Quality Improvements. This change adds general code quality and documentation improvements. More info here: https://github.com/WordPress/twentynineteen/pull/546 Props grapplerulrich, iCaleb, allancole. Merges [44187] to trunk. See #45424. git-svn-id: https://develop.svn.wordpress.org/trunk@44298 602fd350-edb4-49c9-b593-d223f7449a82 --- .../themes/twentynineteen/archive.php | 2 - .../themes/twentynineteen/functions.php | 9 ++- .../themes/twentynineteen/header.php | 15 +++-- .../themes/twentynineteen/image.php | 2 +- .../twentynineteen/inc/color-patterns.php | 60 +++++++++++++------ .../themes/twentynineteen/inc/customizer.php | 4 +- .../twentynineteen/inc/template-functions.php | 10 +--- .../twentynineteen/inc/template-tags.php | 18 +++--- .../themes/twentynineteen/index.php | 2 +- .../navigation/_menu-social-navigation.scss | 3 + .../themes/twentynineteen/style-rtl.css | 1 + .../themes/twentynineteen/style.css | 1 + 12 files changed, 80 insertions(+), 47 deletions(-) diff --git a/src/wp-content/themes/twentynineteen/archive.php b/src/wp-content/themes/twentynineteen/archive.php index 3d2273e43e..88703de75a 100644 --- a/src/wp-content/themes/twentynineteen/archive.php +++ b/src/wp-content/themes/twentynineteen/archive.php @@ -20,8 +20,6 @@ get_header(); diff --git a/src/wp-content/themes/twentynineteen/functions.php b/src/wp-content/themes/twentynineteen/functions.php index 424e72bb38..1498ee2c52 100644 --- a/src/wp-content/themes/twentynineteen/functions.php +++ b/src/wp-content/themes/twentynineteen/functions.php @@ -263,14 +263,13 @@ function twentynineteen_colors_css_wrap() { require_once get_parent_theme_file_path( '/inc/color-patterns.php' ); - if ( 'default' === get_theme_mod( 'primary_color', 'default' ) ) { - $primary_color = 199; - } else { - $primary_color = absint( get_theme_mod( 'primary_color_hue', 199 ) ); + $primary_color = 199; + if ( 'default' !== get_theme_mod( 'primary_color', 'default' ) ) { + $primary_color = get_theme_mod( 'primary_color_hue', 199 ); } ?> -