Make WordPress Core


Ignore:
Timestamp:
12/18/2018 10:08:33 PM (6 years ago)
Author:
desrosj
Message:

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.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

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

    r44149 r44298  
    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.