Make WordPress Core


Ignore:
Timestamp:
11/19/2018 09:26:02 PM (6 years ago)
Author:
allancole
Message:

Updating Twenty Nineteen, our new default theme for 2019, set for 5.0.

This update changes the following:

  • Fix JS errors in customizer caused by menu scripts
  • Fix footer menu spacing
  • Fix pullquote block borders to follow Gutenberg’s described style
  • Fix editor-only styles so they don't appear on the frontend when not needed
  • Fix search field widget width on mobile
  • Fix :visited .button link colors
  • Fix Block toolbar position in the editor
  • Fix off-canvas mobile menu to prevent text from overflowing
  • Improve column block formatting for the editor and frontend
  • Improve CSS optimization for selectors that add dashes to multi-level lists
  • Improve editor font sizes to use pixels over ems
  • Improve styles for galleries in the Classic Editor block
  • Improve priority+ more-menu threshold to allow more space for menu-items
  • Improve logo size on mobile devices
  • Improve customizer color options to present a single, unified color option
  • Improve print stylesheet for better spacing and colors
  • Add more color options to Gutenberg editor

Initial development occurred on GitHub. See: https://github.com/WordPress/twentynineteen

Props allancole, karmatosed, kjellr, yingling017, mrasharirfan, milana_cap, fabiankaegy, westonruter, jorbin, netweb, b-07, khleomix, audrasjb, nielslange, mmaumio, richsalvucci, littlebigthing, dimadin, joyously, anevins, peterwilsoncc, dannycooper, iCaleb, siriokun, technosiren, travel_girl, azchughtai, ianbelanger, nadim1992, ismailelkorchi, nativeinside, chetan200891, grapplerulrich, ocean90, joshfeck, frankew, AbdulWahab610, mendezcode, eliorivero, melchoyce, joen, laurelfulford, mdawaffe, kraftbj, dsmart, nao, mayukojpn, enodekciw, ketuchetan, atanasangelovdev, poena, sharaz, artisticasad, mukesh27, burhandodhy, crunnells, aprakasa, themeroots, imonly_ik, tlxo, youthkee, brentswisher, smyoon315, mrahmadawais, desideveloper, Kau-Boy, mor10, mikeyarce, dingo_bastard

File:
1 edited

Legend:

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

    r43892 r43909  
    108108        add_editor_style( 'style-editor.css' );
    109109
     110        // Add custom editor font sizes
     111        add_theme_support(
     112            'editor-font-sizes',
     113            array(
     114                array(
     115                    'name' => __( 'Small', 'twentynineteen' ),
     116                    'shortName' => __( 'S', 'twentynineteen' ),
     117                    'size' => 19.5,
     118                    'slug' => 'small',
     119                ),
     120                array(
     121                    'name' => __( 'Normal', 'twentynineteen' ),
     122                    'shortName' => __( 'M', 'twentynineteen' ),
     123                    'size' => 22,
     124                    'slug' => 'normal',
     125                ),
     126                array(
     127                    'name' => __( 'Large', 'twentynineteen' ),
     128                    'shortName' => __( 'L', 'twentynineteen' ),
     129                    'size' => 36.5,
     130                    'slug' => 'large',
     131                ),
     132                array(
     133                    'name' => __( 'Huge', 'twentynineteen' ),
     134                    'shortName' => __( 'XL', 'twentynineteen' ),
     135                    'size' => 49.5,
     136                    'slug' => 'huge',
     137                ),
     138            )
     139        );
     140
    110141        // Editor color palette.
    111142        add_theme_support(
     
    113144            array(
    114145                array(
    115                     'name'  => __( 'Primary Color', 'twentynineteen' ),
     146                    'name'  => __( 'Primary', 'twentynineteen' ),
    116147                    'slug'  => 'primary',
    117                     'color' => twentynineteen_hsl_hex( 'default' === get_theme_mod( 'colorscheme' ) ? 199 : get_theme_mod( 'colorscheme_primary_hue', 199 ), 100, 33 ),
     148                    'color' => twentynineteen_hsl_hex( 'default' === get_theme_mod( 'primary_color' ) ? 199 : get_theme_mod( 'primary_color_hue', 199 ), 100, 33 ),
     149                ),
     150                array(
     151                    'name'  => __( 'Secondary', 'twentynineteen' ),
     152                    'slug'  => 'secondary',
     153                    'color' => twentynineteen_hsl_hex( 'default' === get_theme_mod( 'primary_color' ) ? 199 : get_theme_mod( 'primary_color_hue', 199 ), 100, 23 ),
     154                ),
     155                array(
     156                    'name'  => __( 'Dark Gray', 'twentynineteen' ),
     157                    'slug'  => 'dark-gray',
     158                    'color' => '#111',
     159                ),
     160                array(
     161                    'name'  => __( 'Light Gray', 'twentynineteen' ),
     162                    'slug'  => 'light-gray',
     163                    'color' => '#767676',
     164                ),
     165                array(
     166                    'name'  => __( 'White', 'twentynineteen' ),
     167                    'slug'  => 'white',
     168                    'color' => '#FFF',
    118169                ),
    119170            )
     
    122173        // Add support for responsive embedded content.
    123174        add_theme_support( 'responsive-embeds' );
    124 
    125175    }
    126176endif;
     
    194244    wp_enqueue_style( 'twentynineteen-editor-customizer-styles', get_theme_file_uri( '/style-editor-customizer.css' ), false, '1.0', 'all' );
    195245
    196     if ( 'custom' === get_theme_mod( 'colorscheme' ) ) {
     246    if ( 'custom' === get_theme_mod( 'primary_color' ) ) {
    197247        // Include color patterns
    198248        require_once get_parent_theme_file_path( '/inc/color-patterns.php' );
     
    208258
    209259    // Only include custom colors in customizer or frontend.
    210     if ( ( ! is_customize_preview() && 'default' === get_theme_mod( 'colorscheme', 'default' ) ) || is_admin() ) {
     260    if ( ( ! is_customize_preview() && 'default' === get_theme_mod( 'primary_color', 'default' ) ) || is_admin() ) {
    211261        return;
    212262    }
     
    214264    require_once get_parent_theme_file_path( '/inc/color-patterns.php' );
    215265
    216     if ( 'default' === get_theme_mod( 'colorscheme', 'default' ) ) {
     266    if ( 'default' === get_theme_mod( 'primary_color', 'default' ) ) {
    217267        $primary_color = 199;
    218268    } else {
    219         $primary_color = absint( get_theme_mod( 'colorscheme_primary_hue', 199 ) );
     269        $primary_color = absint( get_theme_mod( 'primary_color_hue', 199 ) );
    220270    }
    221271    ?>
Note: See TracChangeset for help on using the changeset viewer.