Make WordPress Core


Ignore:
Timestamp:
12/14/2018 07:08:06 PM (6 years ago)
Author:
allancole
Message:

Updating Twenty Nineteen, the new default theme for 2019.

This change adds general code quality and documentation improvements.

Props grapplerulrich, iCaleb.

File:
1 edited

Legend:

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

    r43929 r44187  
    264264    require_once get_parent_theme_file_path( '/inc/color-patterns.php' );
    265265
    266     if ( 'default' === get_theme_mod( 'primary_color', 'default' ) ) {
    267         $primary_color = 199;
    268     } else {
    269         $primary_color = absint( get_theme_mod( 'primary_color_hue', 199 ) );
     266    $primary_color = 199;
     267    if ( 'default' !== get_theme_mod( 'primary_color', 'default' ) ) {
     268        $primary_color = get_theme_mod( 'primary_color_hue', 199 );
    270269    }
    271270    ?>
    272271
    273     <style type="text/css" id="custom-theme-colors" <?php echo is_customize_preview() ? 'data-hue="' . $primary_color . '"' : ''; ?>>
     272    <style type="text/css" id="custom-theme-colors" <?php echo is_customize_preview() ? 'data-hue="' . absint( $primary_color ) . '"' : ''; ?>>
    274273        <?php echo twentynineteen_custom_colors_css(); ?>
    275274    </style>
Note: See TracChangeset for help on using the changeset viewer.