Make WordPress Core

Ticket #48386: 48386.diff

File 48386.diff, 44.6 KB (added by ianbelanger, 5 years ago)
  • src/wp-content/themes/twentytwenty/.stylelintrc.json

     
    1 {
    2         "extends": [
    3                 "stylelint-config-wordpress"
    4         ],
    5         "plugins": ["stylelint-a11y"],
    6         "rules": {
    7                 "font-family-no-missing-generic-family-keyword": null,
    8                 "no-descending-specificity": null,
    9                 "a11y/no-outline-none": true,
    10                 "a11y/selector-pseudo-class-focus": true
    11         }
    12 }
     1{
     2        "extends": [
     3                "stylelint-config-wordpress"
     4        ],
     5        "plugins": ["stylelint-a11y"],
     6        "rules": {
     7                "font-family-no-missing-generic-family-keyword": null,
     8                "no-descending-specificity": null,
     9                "a11y/no-outline-none": true,
     10                "a11y/selector-pseudo-class-focus": true
     11        }
     12}
  • src/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css

     
    1212}
    1313
    1414.editor-styles-wrapper > * {
    15         color: #000;
    1615        font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
    1716        font-size: 18px;
    1817}
     
    2625}
    2726
    2827.block-editor-default-block-appender textarea.block-editor-default-block-appender__content {
     28        color: inherit;
    2929        font-family: inherit;
    3030        font-size: inherit;
    3131}
    3232
     33.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle:not(:hover):not(:focus),
     34.block-editor-default-block-appender .block-editor-inserter .block-editor-inserter__toggle:not(:hover):not(:focus) {
     35        color: inherit;
     36}
     37
    3338
    3439/* Fonts ------------------------------------- */
    3540
     
    195200
    196201/* Typography -------------------------------- */
    197202
    198 .editor-styles-wrapper a {
     203.editor-styles-wrapper .editor-block-list__layout a {
    199204        color: #cd2653;
    200205        text-decoration: underline;
    201206}
     
    212217.editor-styles-wrapper .wp-block h4,
    213218.editor-styles-wrapper .wp-block h5,
    214219.editor-styles-wrapper .wp-block h6 {
    215         color: #000;
    216220        font-feature-settings: "lnum";
    217221        font-variant-numeric: lining-nums;
    218222        font-weight: 700;
     
    473477        border: none;
    474478}
    475479
    476 .editor-styles-wrapper  .wp-block-table caption {
     480.editor-styles-wrapper .wp-block-table caption {
    477481        background: #dcd7ca;
    478482        text-align: center;
    479483}
    480484
    481 .editor-styles-wrapper  .wp-block-table th,
    482 .editor-styles-wrapper  .wp-block-table td {
     485.editor-styles-wrapper .wp-block-table th,
     486.editor-styles-wrapper .wp-block-table td {
    483487        line-height: 1.4;
    484488        margin: 0;
    485489        overflow: visible;
     
    575579        border-color: #cd2653;
    576580        border-style: solid;
    577581        border-width: 0 2px 0 0;
    578         color: inherit;
    579582        margin: 20px 0;
    580583        padding: 5px 20px 5px 0;
    581584}
     
    633636
    634637/* Block: Code, Verse and Preformatted ------- */
    635638
     639.editor-styles-wrapper .wp-block-code {
     640        color: inherit;
     641}
     642
    636643.editor-styles-wrapper .wp-block-code,
    637644.editor-styles-wrapper .wp-block-preformatted pre,
    638645.editor-styles-wrapper .wp-block-verse pre {
     
    641648        padding: 30px;
    642649}
    643650
     651.editor-styles-wrapper .wp-block-freeform.block-library-rich-text__tinymce pre,
    644652.editor-styles-wrapper .wp-block-preformatted pre,
    645653.editor-styles-wrapper .wp-block-code .block-editor-plain-text,
    646654.editor-styles-wrapper .wp-block-verse pre {
    647655        background: transparent;
     656        color: inherit;
    648657        font-family: monospace;
    649658        font-size: 14px;
    650659}
     
    938947        margin-top: 15px;
    939948}
    940949
     950/* Block: Shortcode -------------------------- */
     951
     952.editor-styles-wrapper .wp-block-shortcode textarea {
     953        color: #191e23;
     954}
     955
    941956/* Block: Embed ------------------------------ */
    942957
    943958.editor-styles-wrapper .wp-block-embed {
  • src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css

     
    1212}
    1313
    1414.editor-styles-wrapper > * {
    15         color: #000;
    1615        font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
    1716        font-size: 18px;
    1817}
     
    2625}
    2726
    2827.block-editor-default-block-appender textarea.block-editor-default-block-appender__content {
     28        color: inherit;
    2929        font-family: inherit;
    3030        font-size: inherit;
    3131}
    3232
     33.block-editor-block-list__empty-block-inserter .block-editor-inserter__toggle:not(:hover):not(:focus),
     34.block-editor-default-block-appender .block-editor-inserter .block-editor-inserter__toggle:not(:hover):not(:focus) {
     35        color: inherit;
     36}
     37
    3338
    3439/* Fonts ------------------------------------- */
    3540
     
    195200
    196201/* Typography -------------------------------- */
    197202
    198 .editor-styles-wrapper a {
     203.editor-styles-wrapper .editor-block-list__layout a {
    199204        color: #cd2653;
    200205        text-decoration: underline;
    201206}
     
    212217.editor-styles-wrapper .wp-block h4,
    213218.editor-styles-wrapper .wp-block h5,
    214219.editor-styles-wrapper .wp-block h6 {
    215         color: #000;
    216220        font-feature-settings: "lnum";
    217221        font-variant-numeric: lining-nums;
    218222        font-weight: 700;
     
    473477        border: none;
    474478}
    475479
    476 .editor-styles-wrapper  .wp-block-table caption {
     480.editor-styles-wrapper .wp-block-table caption {
    477481        background: #dcd7ca;
    478482        text-align: center;
    479483}
    480484
    481 .editor-styles-wrapper  .wp-block-table th,
    482 .editor-styles-wrapper  .wp-block-table td {
     485.editor-styles-wrapper .wp-block-table th,
     486.editor-styles-wrapper .wp-block-table td {
    483487        line-height: 1.4;
    484488        margin: 0;
    485489        overflow: visible;
     
    575579        border-color: #cd2653;
    576580        border-style: solid;
    577581        border-width: 0 0 0 2px;
    578         color: inherit;
    579582        margin: 20px 0;
    580583        padding: 5px 0 5px 20px;
    581584}
     
    633636
    634637/* Block: Code, Verse and Preformatted ------- */
    635638
     639.editor-styles-wrapper .wp-block-code {
     640        color: inherit;
     641}
     642
    636643.editor-styles-wrapper .wp-block-code,
    637644.editor-styles-wrapper .wp-block-preformatted pre,
    638645.editor-styles-wrapper .wp-block-verse pre {
     
    641648        padding: 30px;
    642649}
    643650
     651.editor-styles-wrapper .wp-block-freeform.block-library-rich-text__tinymce pre,
    644652.editor-styles-wrapper .wp-block-preformatted pre,
    645653.editor-styles-wrapper .wp-block-code .block-editor-plain-text,
    646654.editor-styles-wrapper .wp-block-verse pre {
    647655        background: transparent;
     656        color: inherit;
    648657        font-family: monospace;
    649658        font-size: 14px;
    650659}
     
    938947        margin-top: 15px;
    939948}
    940949
     950/* Block: Shortcode -------------------------- */
     951
     952.editor-styles-wrapper .wp-block-shortcode textarea {
     953        color: #191e23;
     954}
     955
    941956/* Block: Embed ------------------------------ */
    942957
    943958.editor-styles-wrapper .wp-block-embed {
  • src/wp-content/themes/twentytwenty/assets/js/color-calculations.js

     
    3535 */
    3636_twentyTwentyColor.prototype.setAccentColorsArray = function() {
    3737        var self = this,
    38                 minSaturation = 55,
    39                 maxSaturation = 90,
    40                 minLightness = 25,
    41                 maxLighness = 75,
    42                 stepSaturation = 2.5,
    43                 stepLightness = 2.5,
     38                minSaturation = 65,
     39                maxSaturation = 100,
     40                minLightness = 30,
     41                maxLighness = 80,
     42                stepSaturation = 2,
     43                stepLightness = 2,
    4444                pushColor = function() {
    4545                        var colorObj = new Color( {
    4646                                        h: self.accentHue,
    4747                                        s: s,
    4848                                        l: l
    4949                                } ),
    50                                 item;
     50                                item,
     51                                /**
     52                                 * Get a score for this color in contrast to its background color and surrounding text.
     53                                 *
     54                                 * @since 1.0.0
     55                                 * @param {number} contrastBackground - WCAG contrast with the background color.
     56                                 * @param {number} contrastSurroundingText - WCAG contrast with surrounding text.
     57                                 * @return {number} - 0 is best, higher numbers have bigger difference with the desired scores.
     58                                 */
     59                                getScore = function( contrastBackground, contrastSurroundingText ) {
     60                                        var diffBackground = ( 7 >= contrastBackground ) ? 0 : 7 - contrastBackground,
     61                                                diffSurroundingText = ( 3 >= contrastSurroundingText ) ? 0 : 3 - contrastSurroundingText;
     62
     63                                        return diffBackground + diffSurroundingText;
     64                                };
    5165
    5266                        item = {
    5367                                color: colorObj,
     
    6276
    6377                        // Get a score for this color by multiplying the 2 contrasts.
    6478                        // We'll use that to sort the array.
    65                         item.score = item.contrastBackground * item.contrastText;
     79                        item.score = getScore( item.contrastBackground, item.contrastText );
    6680
    6781                        self.accentColorsArray.push( item );
    6882                },
     
    89103
    90104        // Sort colors by contrast.
    91105        this.accentColorsArray.sort( function( a, b ) {
    92                 return b.score - a.score;
     106                return a.score - b.score;
    93107        } );
    94108        return this;
    95109};
  • src/wp-content/themes/twentytwenty/assets/js/customize-preview.js

     
    9494        api( 'header_footer_background_color', function( value ) {
    9595                value.bind( function( to ) {
    9696                        // Add background color to header and footer wrappers.
    97                         $( '#site-header,#site-footer' ).css( 'background-color', to );
     97                        $( 'body:not(.overlay-header)#site-header, #site-footer' ).css( 'background-color', to );
    9898
    9999                        // Change body classes if this is the same background-color as the content background.
    100100                        if ( to.toLowerCase() === api( 'background_color' ).get().toLowerCase() ) {
  • src/wp-content/themes/twentytwenty/assets/js/index.js

     
    231231                                                modal.style.removeProperty( 'top' );
    232232                                        }
    233233
    234                                         _win.scrollTo( 0, Math.abs( _win.twentytwenty.scrolled + getAdminBarHeight() ) );
    235 
    236                                         _win.twentytwenty.scrolled = 0;
    237 
    238234                                        if ( clickedEl !== false ) {
    239235                                                clickedEl.focus();
    240236                                                clickedEl = false;
    241237                                        }
     238
     239                                        _win.scrollTo( 0, Math.abs( _win.twentytwenty.scrolled + getAdminBarHeight() ) );
     240
     241                                        _win.twentytwenty.scrolled = 0;
    242242                                }, 500 );
    243243                        } );
    244244                } );
     
    621621                                _doc.querySelector( '*[data-toggle-target="' + targetString + '"]' ).classList.toggle( activeClass );
    622622                        }
    623623
    624                         // Toggle aria-expanded on the target
    625                         twentytwentyToggleAttribute( target, 'aria-expanded', 'true', 'false' );
    626 
    627624                        // Toggle aria-expanded on the toggle
    628625                        twentytwentyToggleAttribute( toggle, 'aria-expanded', 'true', 'false' );
    629626
  • src/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php

     
    2626                        $wp_customize->get_setting( 'blogname' )->transport        = 'postMessage';
    2727                        $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
    2828
    29                         /**
    30                          * Removes the background image section.
    31                          * The theme only supports the background color option.
    32                          */
    33                         $wp_customize->remove_section( 'background_image' );
    34 
    3529                        $wp_customize->selective_refresh->add_partial(
    3630                                'blogname',
    3731                                array(
  • src/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-page.php

     
    131131                                        $toggle_duration      = twentytwenty_toggle_duration();
    132132
    133133                                        // Add the sub menu toggle.
    134                                         $args['list_item_after'] .= '<button class="toggle sub-menu-toggle fill-children-current-color" data-toggle-target="' . $toggle_target_string . '" data-toggle-type="slidetoggle" data-toggle-duration="' . absint( $toggle_duration ) . '"><span class="screen-reader-text">' . __( 'Show sub menu', 'twentytwenty' ) . '</span>' . twentytwenty_get_theme_svg( 'chevron-down' ) . '</button>';
     134                                        $args['list_item_after'] .= '<button class="toggle sub-menu-toggle fill-children-current-color" data-toggle-target="' . $toggle_target_string . '" data-toggle-type="slidetoggle" data-toggle-duration="' . absint( $toggle_duration ) . '" aria-expanded="false"><span class="screen-reader-text">' . __( 'Show sub menu', 'twentytwenty' ) . '</span>' . twentytwenty_get_theme_svg( 'chevron-down' ) . '</button>';
    135135
    136136                                }
    137137
  • src/wp-content/themes/twentytwenty/functions.php

     
    602602        $elements = array(
    603603                'content'       => array(
    604604                        'accent'     => array(
    605                                 'color'        => array( '.color-accent', '.color-accent-hover:hover', '.color-accent-hover:focus', '.has-accent-color', '.has-drop-cap:not(:focus):first-letter', '.wp-block-button.is-style-outline', 'a' ),
     605                                'color'        => array( '.color-accent', '.color-accent-hover:hover', '.color-accent-hover:focus', ':root .has-accent-color', '.has-drop-cap:not(:focus):first-letter', '.wp-block-button.is-style-outline', 'a' ),
    606606                                'border-color' => array( 'blockquote', '.border-color-accent', '.border-color-accent-hover:hover', '.border-color-accent-hover:focus' ),
    607                                 'background'   => array( 'button:not(.toggle)', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file .wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.bg-accent', '.bg-accent-hover:hover', '.bg-accent-hover:focus', '.has-accent-background-color', '.comment-reply-link' ),
     607                                'background'   => array( 'button:not(.toggle)', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file .wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.bg-accent', '.bg-accent-hover:hover', '.bg-accent-hover:focus', ':root .has-accent-background-color', '.comment-reply-link' ),
    608608                                'fill'         => array( '.fill-children-accent', '.fill-children-accent *' ),
    609609                        ),
    610610                        'background' => array(
    611                                 'color'      => array( 'button', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-button__link:active', '.wp-block-button__link:focus', '.wp-block-button__link:visited', '.wp-block-button__link:hover', '.wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.comment-reply-link' ),
    612                                 'background' => array( '.has-background-background-color' ),
     611                                'color'      => array( ':root .has-background-color', 'button', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.wp-block-button', '.comment-reply-link' ),
     612                                'background' => array( ':root .has-background-background-color' ),
    613613                        ),
    614614                        'text'       => array(
    615                                 'color'      => array( 'body', '.entry-title a', '.has-primary-color' ),
    616                                 'background' => array( '.has-primary-background-color' ),
     615                                'color'      => array( 'body', '.entry-title a', ':root .has-primary-color' ),
     616                                'background' => array( ':root .has-primary-background-color' ),
    617617                        ),
    618618                        'secondary'  => array(
    619                                 'color'      => array( 'cite', 'figcaption', '.wp-caption-text', '.post-meta', '.entry-content .wp-block-archives li', '.entry-content .wp-block-categories li', '.entry-content .wp-block-latest-posts li', '.wp-block-latest-comments__comment-date', '.wp-block-latest-posts__post-date', '.wp-block-embed figcaption', '.wp-block-image figcaption', '.wp-block-pullquote cite', '.comment-metadata', '.comment-respond .comment-notes', '.comment-respond .logged-in-as', '.pagination .dots', '.entry-content hr:not(.has-background)', 'hr.styled-separator', '.has-secondary-color' ),
    620                                 'background' => array( '.has-secondary-background-color' ),
     619                                'color'      => array( 'cite', 'figcaption', '.wp-caption-text', '.post-meta', '.entry-content .wp-block-archives li', '.entry-content .wp-block-categories li', '.entry-content .wp-block-latest-posts li', '.wp-block-latest-comments__comment-date', '.wp-block-latest-posts__post-date', '.wp-block-embed figcaption', '.wp-block-image figcaption', '.wp-block-pullquote cite', '.comment-metadata', '.comment-respond .comment-notes', '.comment-respond .logged-in-as', '.pagination .dots', '.entry-content hr:not(.has-background)', 'hr.styled-separator', ':root .has-secondary-color' ),
     620                                'background' => array( ':root .has-secondary-background-color' ),
    621621                        ),
    622622                        'borders'    => array(
    623623                                'border-color'        => array( 'pre', 'fieldset', 'input', 'textarea', 'table', 'table *', 'hr' ),
    624                                 'background'          => array( 'caption', 'code', 'code', 'kbd', 'samp', '.wp-block-table.is-style-stripes tbody tr:nth-child(odd)', '.has-subtle-background-background-color' ),
     624                                'background'          => array( 'caption', 'code', 'code', 'kbd', 'samp', '.wp-block-table.is-style-stripes tbody tr:nth-child(odd)', ':root .has-subtle-background-background-color' ),
    625625                                'border-bottom-color' => array( '.wp-block-table.is-style-stripes' ),
    626626                                'border-top-color'    => array( '.wp-block-latest-posts.is-grid li' ),
    627                                 'color'               => array( '.has-subtle-background-color' ),
     627                                'color'               => array( ':root .has-subtle-background-color' ),
    628628                        ),
    629629                ),
    630630                'header-footer' => array(
  • src/wp-content/themes/twentytwenty/inc/custom-css.php

     
    5555        function twentytwenty_get_customizer_css( $type = 'front-end' ) {
    5656
    5757                // Get variables.
    58                 $body           = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'text' ) );
    59                 $body_default   = '#000000';
    60                 $accent         = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'accent' ) );
    61                 $accent_default = '#cd2653';
     58                $body              = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'text' ) );
     59                $body_default      = '#000000';
     60                $secondary         = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'secondary' ) );
     61                $secondary_default = '#6d6d6d';
     62                $borders           = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'borders' ) );
     63                $borders_default   = '#dcd7ca';
     64                $accent            = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'accent' ) );
     65                $accent_default    = '#cd2653';
     66
    6267                /**
    6368                 * Filters the CSS selectors targeting button component on frontend to apply common css
    6469                 *
     
    6974                $buttons_targets = apply_filters( 'twentytwenty_buttons_targets_front_end', 'button, .button, .faux-button, .wp-block-button__link, .wp-block-file__button, input[type=\'button\'], input[type=\'reset\'], input[type=\'submit\']' );
    7075
    7176                // Header.
    72                 $header_footer_text   = sanitize_hex_color( twentytwenty_get_color_for_area( 'header-footer', 'text' ) );
    73                 $header_footer_accent = sanitize_hex_color( twentytwenty_get_color_for_area( 'header-footer', 'accent' ) );
     77                $header_footer_background         = sanitize_hex_color( twentytwenty_get_color_for_area( 'header-footer', 'background' ) );
     78                $header_footer_background_default = '#ffffff';
    7479
    7580                // Cover.
    7681                $cover         = sanitize_hex_color( get_theme_mod( 'cover_template_overlay_text_color' ) );
     
    126131                        // Colors.
    127132                        // Accent color.
    128133                        if ( $accent && $accent !== $accent_default ) {
    129                                 twentytwenty_generate_css( '.editor-styles-wrapper a, .editor-styles-wrapper .has-drop-cap:not(:focus):first-letter', 'color', $accent );
    130                                 twentytwenty_generate_css( '.editor-styles-wrapper blockquote, .editor-styles-wrapper .wp-block-quote', 'border-color', $accent, '', ' !important' );
    131                                 twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-file .wp-block-file__textlink', 'color', $accent );
    132                                 twentytwenty_generate_css( $buttons_targets, 'background', $accent );
    133                                 twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link', 'border-color', $accent );
    134                                 twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link', 'color', $accent );
     134                                twentytwenty_generate_css( '.has-accent-color, .editor-styles-wrapper .editor-block-list__layout a, .editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter, .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link, .editor-styles-wrapper .wp-block-pullquote::before, .editor-styles-wrapper .wp-block-file .wp-block-file__textlink', 'color', $accent );
     135                                twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-quote', 'border-color', $accent, '' );
     136                                twentytwenty_generate_css( '.has-accent-background-color, .editor-styles-wrapper .wp-block-button__link, .editor-styles-wrapper .wp-block-file__button', 'background-color', $accent );
    135137                        }
    136138
    137139                        // Background color.
     
    139141                                twentytwenty_generate_css( '.editor-styles-wrapper', 'background', '#' . $background );
    140142                        }
    141143
     144                        // Borders color.
     145                        if ( $borders && $borders !== $borders_default ) {
     146                                twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-code, .editor-styles-wrapper pre, .editor-styles-wrapper .wp-block-preformatted pre, .editor-styles-wrapper .wp-block-verse pre, .editor-styles-wrapper fieldset, .editor-styles-wrapper .wp-block-table, .editor-styles-wrapper .wp-block-table *, .editor-styles-wrapper .wp-block-table.is-style-stripes, .editor-styles-wrapper .wp-block-latest-posts.is-grid li', 'border-color', $borders );
     147                                twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-table caption, .editor-styles-wrapper .wp-block-table.is-style-stripes tbody tr:nth-child(odd)', 'background-color', $borders );
     148                        }
     149
    142150                        // Text color.
    143151                        if ( $body && $body !== $body_default ) {
    144                                 twentytwenty_generate_css( 'body .editor-styles-wrapper, body .editor-post-title__block, body .editor-post-title__input, body textarea, .editor-post-title__block .editor-post-title__input', 'color', $body );
     152                                twentytwenty_generate_css( 'body .editor-styles-wrapper, .editor-post-title__block .editor-post-title__input, .editor-post-title__block .editor-post-title__input:focus', 'color', $body );
     153                        }
     154
     155                        // Secondary color.
     156                        if ( $secondary && $secondary !== $secondary_default ) {
     157                                twentytwenty_generate_css( '.editor-styles-wrapper figcaption, .editor-styles-wrapper cite, .editor-styles-wrapper .wp-block-quote__citation, .editor-styles-wrapper .wp-block-quote cite, .editor-styles-wrapper .wp-block-quote footer, .editor-styles-wrapper .wp-block-pullquote__citation, .editor-styles-wrapper .wp-block-pullquote cite, .editor-styles-wrapper .wp-block-pullquote footer, .editor-styles-wrapper ul.wp-block-archives li, .editor-styles-wrapper ul.wp-block-categories li, .editor-styles-wrapper ul.wp-block-latest-posts li, .editor-styles-wrapper ul.wp-block-categories__list li, .editor-styles-wrapper .wp-block-latest-comments time, .editor-styles-wrapper .wp-block-latest-posts time', 'color', $secondary );
     158                        }
     159
     160                        // Header Footer Background Color.
     161                        if ( $header_footer_background && $header_footer_background !== $header_footer_background_default ) {
     162                                twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-pullquote::before', 'background-color', $header_footer_background );
    145163                        }
    146164                } elseif ( 'classic-editor' === $type ) {
    147165
  • src/wp-content/themes/twentytwenty/inc/starter-content.php

     
    2121
    2222        // Define and register starter content to showcase the theme on new sites.
    2323        $starter_content = array(
    24                 'widgets'   => array(
     24                'widgets'     => array(
    2525                        // Place one core-defined widgets in the first footer widget area.
    2626                        'sidebar-1' => array(
    2727                                'text_about',
     
    3232                        ),
    3333                ),
    3434
     35                // Create the custom image attachments used as post thumbnails for pages.
     36                'attachments' => array(
     37                        'image-opening' => array(
     38                                'post_title' => _x( 'The New UMoMA Opens its Doors', 'Theme starter content', 'twentytwenty' ),
     39                                'file'       => 'assets/images/2020-landscape-1.png', // URL relative to the template directory.
     40                        ),
     41                ),
     42
    3543                // Specify the core-defined pages to create and add custom thumbnails to some of them.
    36                 'posts'     => array(
     44                'posts'       => array(
    3745                        'front' => array(
    3846                                'post_type'    => 'page',
    3947                                'post_title'   => __( 'The New UMoMA Opens its Doors', 'twentytwenty' ),
     48                                // Use the above featured image with the predefined about page.
     49                                'thumbnail'    => '{{image-opening}}',
    4050                                'post_content' => join(
    4151                                        '',
    4252                                        array(
     
    4959                                                '<div class="wp-block-columns alignwide"><!-- wp:column -->',
    5060                                                '<div class="wp-block-column"><!-- wp:group -->',
    5161                                                '<div class="wp-block-group"><div class="wp-block-group__inner-container">',
     62                                                '<!-- wp:image {"align":"full","id":37,"sizeSlug":"full"} -->',
     63                                                '<figure class="wp-block-image alignfull size-full"><img src="' . get_theme_file_uri() . '/assets/images/2020-three-quarters-1.png" alt="" class="wp-image-37"/></figure>',
     64                                                '<!-- /wp:image -->',
    5265                                                '<!-- wp:heading {"level":3} -->',
    5366                                                '<h3>' . __( 'Works and Days', 'twentytwenty' ) . '</h3>',
    5467                                                '<!-- /wp:heading -->',
     
    6174                                                '<!-- /wp:group -->',
    6275                                                '<!-- wp:group -->',
    6376                                                '<div class="wp-block-group"><div class="wp-block-group__inner-container">',
     77                                                '<!-- wp:image {"align":"full","id":37,"sizeSlug":"full"} -->',
     78                                                '<figure class="wp-block-image alignfull size-full"><img src="' . get_theme_file_uri() . '/assets/images/2020-three-quarters-3.png" alt="" class="wp-image-37"/></figure>',
     79                                                '<!-- /wp:image -->',
    6480                                                '<!-- wp:heading {"level":3} -->',
    6581                                                '<h3>' . __( 'Theatre of Operations', 'twentytwenty' ) . '</h3>',
    6682                                                '<!-- /wp:heading -->',
     
    7591                                                '<!-- wp:column -->',
    7692                                                '<div class="wp-block-column"><!-- wp:group -->',
    7793                                                '<div class="wp-block-group"><div class="wp-block-group__inner-container">',
     94                                                '<!-- wp:image {"align":"full","id":37,"sizeSlug":"full"} -->',
     95                                                '<figure class="wp-block-image alignfull size-full"><img src="' . get_theme_file_uri() . '/assets/images/2020-three-quarters-2.png" alt="" class="wp-image-37"/></figure>',
     96                                                '<!-- /wp:image -->',
    7897                                                '<!-- wp:heading {"level":3} -->',
    7998                                                '<h3>' . __( 'The Life I Deserve', 'twentytwenty' ) . '</h3>',
    8099                                                '<!-- /wp:heading -->',
     
    87106                                                '<!-- /wp:group -->',
    88107                                                '<!-- wp:group -->',
    89108                                                '<div class="wp-block-group"><div class="wp-block-group__inner-container">',
     109                                                '<!-- wp:image {"align":"full","id":37,"sizeSlug":"full"} -->',
     110                                                '<figure class="wp-block-image alignfull size-full"><img src="' . get_theme_file_uri() . '/assets/images/2020-three-quarters-4.png" alt="" class="wp-image-37"/></figure>',
     111                                                '<!-- /wp:image -->',
    90112                                                '<!-- wp:heading {"level":3} -->',
    91113                                                '<h3>' . __( 'From Signac to Matisse', 'twentytwenty' ) . '</h3>',
    92114                                                '<!-- /wp:heading -->',
     
    99121                                                '<!-- /wp:group --></div>',
    100122                                                '<!-- /wp:column --></div>',
    101123                                                '<!-- /wp:columns -->',
     124                                                '<!-- wp:image {"align":"full","id":37,"sizeSlug":"full"} -->',
     125                                                '<figure class="wp-block-image alignfull size-full"><img src="' . get_theme_file_uri() . '/assets/images/2020-landscape-2.png" alt="" class="wp-image-37"/></figure>',
     126                                                '<!-- /wp:image -->',
    102127                                                '<!-- wp:group {"align":"wide"} -->',
    103128                                                '<div class="wp-block-group alignwide"><div class="wp-block-group__inner-container"><!-- wp:heading {"align":"center","textColor":"accent"} -->',
    104129                                                '<h2 class="has-accent-color has-text-align-center">' . __( '”Cyborgs, as the philosopher Donna Haraway established, are not reverent. They do not remember the cosmos.”', 'twentytwenty' ) . '</h2>',
     
    126151                                                '<!-- /wp:button --></div></div>',
    127152                                                '<!-- /wp:group --></div></div>',
    128153                                                '<!-- /wp:group -->',
     154                                                '<!-- wp:gallery {"ids":[39,38],"align":"wide"} -->',
     155                                                '<figure class="wp-block-gallery alignwide columns-2 is-cropped"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><img src="' . get_theme_file_uri() . '/assets/images/2020-square-2-1024x1024.png" alt="" data-id="39" data-full-url="' . get_theme_file_uri() . '/assets/images/2020-square-2.png" data-link="assets/images/2020-square-2/" class="wp-image-39"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . get_theme_file_uri() . '/assets/images/2020-square-1-1024x1024.png" alt="" data-id="38" data-full-url="' . get_theme_file_uri() . '/assets/images/2020-square-1.png" data-link="' . get_theme_file_uri() . '/assets/images/2020-square-1/" class="wp-image-38"/></figure></li></ul></figure>',
     156                                                '<!-- /wp:gallery -->',
    129157                                        )
    130158                                ),
    131159                        ),
     
    135163                ),
    136164
    137165                // Default to a static front page and assign the front and posts pages.
    138                 'options'   => array(
     166                'options'     => array(
    139167                        'show_on_front'  => 'page',
    140168                        'page_on_front'  => '{{front}}',
    141169                        'page_for_posts' => '{{blog}}',
    142170                ),
    143171
    144172                // Set up nav menus for each of the two areas registered in the theme.
    145                 'nav_menus' => array(
     173                'nav_menus'   => array(
    146174                        // Assign a menu to the "primary" location.
    147175                        'primary'  => array(
    148176                                'name'  => __( 'Primary', 'twentytwenty' ),
  • src/wp-content/themes/twentytwenty/inc/template-tags.php

     
    190190 * @param string $text    Anchor text.
    191191 */
    192192function twentytwenty_edit_post_link( $link, $post_id, $text ) {
     193        if ( is_admin() ) {
     194                return $link;
     195        }
    193196
    194197        $edit_url = get_edit_post_link( $post_id );
    195198
     
    219222/**
    220223 * Get the post meta.
    221224 *
    222  * @param int    $post_id The iD of the post.
     225 * @param int    $post_id The ID of the post.
    223226 * @param string $location The location where the meta is shown.
    224227 */
    225228function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' ) {
     
    543546                        $toggle_duration      = twentytwenty_toggle_duration();
    544547
    545548                        // Add the sub menu toggle.
    546                         $args->after .= '<button class="toggle sub-menu-toggle fill-children-current-color" data-toggle-target="' . $toggle_target_string . '" data-toggle-type="slidetoggle" data-toggle-duration="' . absint( $toggle_duration ) . '"><span class="screen-reader-text">' . __( 'Show sub menu', 'twentytwenty' ) . '</span>' . twentytwenty_get_theme_svg( 'chevron-down' ) . '</button>';
     549                        $args->after .= '<button class="toggle sub-menu-toggle fill-children-current-color" data-toggle-target="' . $toggle_target_string . '" data-toggle-type="slidetoggle" data-toggle-duration="' . absint( $toggle_duration ) . '" aria-expanded="false"><span class="screen-reader-text">' . __( 'Show sub menu', 'twentytwenty' ) . '</span>' . twentytwenty_get_theme_svg( 'chevron-down' ) . '</button>';
    547550
    548551                }
    549552
  • src/wp-content/themes/twentytwenty/style-rtl.css

     
    141141        word-wrap: break-word;
    142142}
    143143
    144 ::selection {
    145         background: #000;
    146         color: #fff;
    147 }
    148 
    149144#site-content {
    150145        overflow: hidden;
    151146}
     
    14151410}
    14161411
    14171412.toggle-inner {
     1413        display: flex;
     1414        justify-content: center;
    14181415        height: 2.3rem;
    14191416        position: relative;
    14201417}
     
    14601457        width: 2.3rem;
    14611458}
    14621459
    1463 .search-toggle .toggle-text {
    1464         right: 0;
    1465         text-align: right;
    1466 }
    1467 
    14681460/* Navigation Toggle ------------------------- */
    14691461
    14701462.nav-toggle {
     
    14851477        padding-top: 0.8rem;
    14861478}
    14871479
    1488 .nav-toggle .toggle-text {
    1489         left: 0;
    1490         text-align: left;
    1491 }
    1492 
    14931480/* Primary Menu ---------------------------- */
    14941481
    14951482.primary-menu-wrapper {
     
    24792466
    24802467.author-bio {
    24812468        margin-top: 4rem;
     2469        display: flex;
     2470        flex-wrap: wrap;
     2471        align-items: flex-start;
    24822472}
    24832473
    2484 .hide-avatars .author-bio {
    2485         padding-right: 0;
     2474.author-info {
     2475        flex: 1;
    24862476}
    24872477
    2488 .author-bio-inner p:last-child {
    2489         margin-bottom: 0;
     2478.hide-avatars img.avatar {
     2479        display: none;
    24902480}
    24912481
    24922482.author-bio .avatar {
    24932483        margin-left: 1.5rem;
    2494         height: 5rem;
    24952484        width: 5rem;
    24962485}
    24972486
    24982487.author-bio .author-title {
    2499         align-items: center;
    2500         display: flex;
    2501         margin: 0 0 1rem 0;
     2488        margin: 0;
    25022489}
    25032490
    25042491.author-bio .author-link {
     
    25762563
    25772564/* CUSTOM COLORS */
    25782565
    2579 .has-accent-color {
     2566:root .has-accent-color {
    25802567        color: #cd2653;
    25812568}
    25822569
    2583 .has-accent-background-color {
     2570:root .has-accent-background-color {
    25842571        background-color: #cd2653;
    25852572}
    25862573
    2587 .has-primary-color {
     2574:root .has-primary-color {
    25882575        color: #000;
    25892576}
    25902577
    2591 .has-primary-background-color {
     2578:root .has-primary-background-color {
    25922579        background-color: #000;
    25932580}
    25942581
    2595 .has-secondary-color {
     2582:root .has-secondary-color {
    25962583        color: #6d6d6d;
    25972584}
    25982585
    2599 .has-secondary-background-color {
     2586:root .has-secondary-background-color {
    26002587        background-color: #6d6d6d;
    26012588}
    26022589
    2603 .has-subtle-background-color {
     2590:root .has-subtle-background-color {
    26042591        color: #dcd7ca;
    26052592}
    26062593
    2607 .has-subtle-background-background-color {
     2594:root .has-subtle-background-background-color {
    26082595        background-color: #dcd7ca;
    26092596}
    26102597
    2611 .has-background-color {
     2598:root .has-background-color {
    26122599        color: #f5efe0;
    26132600}
    26142601
    2615 .has-background-background-color {
     2602:root .has-background-background-color {
    26162603        background-color: #f5efe0;
    26172604}
    26182605
     
    28442831
    28452832/* Block: Button ----------------------------- */
    28462833
     2834.wp-block-button {
     2835        margin: 3rem 0;
     2836}
     2837
    28472838.wp-block-button.is-style-outline {
    28482839        color: #cd2653;
    28492840}
    28502841
    2851 .wp-block-button.is-style-outline .wp-block-button__link {
     2842.is-style-outline .wp-block-button__link:not(.has-text-color) {
    28522843        color: inherit;
    28532844}
    28542845
     2846.is-style-outline .wp-block-button__link {
     2847        padding: calc(1.1em - 0.2rem) calc(1.44em - 0.2rem);
     2848}
     2849
    28552850/* Block: Columns ---------------------------- */
    28562851
    28572852.wp-block-column {
     
    29932988        max-width: none;
    29942989}
    29952990
     2991.wp-block-media-text__content > *:first-child {
     2992        margin-top: 0;
     2993}
     2994
    29962995.wp-block-media-text__content > *:last-child {
    29972996        margin-bottom: 0;
    29982997}
     
    43354334
    43364335        /* BLOCK: COLUMNS */
    43374336
    4338         .alignfull .wp-block-column > p:not(.has-background-color),
     4337        .alignfull:not(.has-background) .wp-block-column > p:not(.has-background-color),
    43394338        .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    43404339                max-width: calc(100% - 4rem);
    43414340                margin: auto;
    43424341        }
    43434342}
    43444343
    4345 @media ( min-width: 600px ) {
     4344@media ( min-width: 600px ) and ( max-width: 781px ) {
    43464345
    43474346        /* Blocks -------------------------------- */
    43484347
    43494348        /* BLOCK: COLUMNS */
    43504349
    4351         .alignfull .wp-block-column:nth-child(odd) > p:not(.has-background-color),
     4350        .alignfull:not(.has-background) .wp-block-column:nth-child(odd) > p:not(.has-background-color),
    43524351        .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    43534352                padding-right: 2rem;
    43544353        }
    43554354
    4356         .alignfull .wp-block-column:nth-child(even) > p:not(.has-background-color),
     4355        .alignfull:not(.has-background) .wp-block-column:nth-child(even) > p:not(.has-background-color),
    43574356        .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    43584357                padding-left: 2rem;
    43594358        }
     
    47624761        .author-bio {
    47634762                margin-top: 8rem;
    47644763                min-height: 8rem;
    4765                 padding-right: 10rem;
    47664764                position: relative;
    47674765        }
    47684766
    47694767        .author-bio .avatar {
    4770                 position: absolute;
    4771                 right: 0;
    4772                 top: 0;
    4773                 height: 8rem;
    47744768                width: 8rem;
    47754769        }
    47764770
     
    52515245
    52525246        /* BLOCK: COLUMNS */
    52535247
     5248        .wp-block-column {
     5249                margin-bottom: 0;
     5250        }
     5251
    52545252        .alignfull .wp-block-column:first-child > p,
    52555253        .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    52565254                padding-right: 2rem;
    52575255        }
    52585256
    5259         .alignfull .wp-block-column:last-child > p,
     5257        .alignfull:not(.has-background) .wp-block-column:last-child > p,
    52605258        .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    52615259                padding-left: 2rem;
    52625260        }
  • src/wp-content/themes/twentytwenty/style.css

     
    141141        word-wrap: break-word;
    142142}
    143143
    144 ::selection {
    145         background: #000;
    146         color: #fff;
    147 }
    148 
    149144#site-content {
    150145        overflow: hidden;
    151146}
     
    14211416}
    14221417
    14231418.toggle-inner {
     1419        display: flex;
     1420        justify-content: center;
    14241421        height: 2.3rem;
    14251422        position: relative;
    14261423}
     
    14661463        width: 2.3rem;
    14671464}
    14681465
    1469 .search-toggle .toggle-text {
    1470         left: 0;
    1471         text-align: left;
    1472 }
    1473 
    14741466/* Navigation Toggle ------------------------- */
    14751467
    14761468.nav-toggle {
     
    14911483        padding-top: 0.8rem;
    14921484}
    14931485
    1494 .nav-toggle .toggle-text {
    1495         right: 0;
    1496         text-align: right;
    1497 }
    1498 
    14991486/* Primary Menu ---------------------------- */
    15001487
    15011488.primary-menu-wrapper {
     
    24872474
    24882475.author-bio {
    24892476        margin-top: 4rem;
     2477        display: flex;
     2478        flex-wrap: wrap;
     2479        align-items: flex-start;
    24902480}
    24912481
    2492 .hide-avatars .author-bio {
    2493         padding-left: 0;
     2482.author-info {
     2483        flex: 1;
    24942484}
    24952485
    2496 .author-bio-inner p:last-child {
    2497         margin-bottom: 0;
     2486.hide-avatars img.avatar {
     2487        display: none;
    24982488}
    24992489
    25002490.author-bio .avatar {
    25012491        margin-right: 1.5rem;
    2502         height: 5rem;
    25032492        width: 5rem;
    25042493}
    25052494
    25062495.author-bio .author-title {
    2507         align-items: center;
    2508         display: flex;
    2509         margin: 0 0 1rem 0;
     2496        margin: 0;
    25102497}
    25112498
    25122499.author-bio .author-link {
     
    25842571
    25852572/* CUSTOM COLORS */
    25862573
    2587 .has-accent-color {
     2574:root .has-accent-color {
    25882575        color: #cd2653;
    25892576}
    25902577
    2591 .has-accent-background-color {
     2578:root .has-accent-background-color {
    25922579        background-color: #cd2653;
    25932580}
    25942581
    2595 .has-primary-color {
     2582:root .has-primary-color {
    25962583        color: #000;
    25972584}
    25982585
    2599 .has-primary-background-color {
     2586:root .has-primary-background-color {
    26002587        background-color: #000;
    26012588}
    26022589
    2603 .has-secondary-color {
     2590:root .has-secondary-color {
    26042591        color: #6d6d6d;
    26052592}
    26062593
    2607 .has-secondary-background-color {
     2594:root .has-secondary-background-color {
    26082595        background-color: #6d6d6d;
    26092596}
    26102597
    2611 .has-subtle-background-color {
     2598:root .has-subtle-background-color {
    26122599        color: #dcd7ca;
    26132600}
    26142601
    2615 .has-subtle-background-background-color {
     2602:root .has-subtle-background-background-color {
    26162603        background-color: #dcd7ca;
    26172604}
    26182605
    2619 .has-background-color {
     2606:root .has-background-color {
    26202607        color: #f5efe0;
    26212608}
    26222609
    2623 .has-background-background-color {
     2610:root .has-background-background-color {
    26242611        background-color: #f5efe0;
    26252612}
    26262613
     
    28542841
    28552842/* Block: Button ----------------------------- */
    28562843
     2844.wp-block-button {
     2845        margin: 3rem 0;
     2846}
     2847
    28572848.wp-block-button.is-style-outline {
    28582849        color: #cd2653;
    28592850}
    28602851
    2861 .wp-block-button.is-style-outline .wp-block-button__link {
     2852.is-style-outline .wp-block-button__link:not(.has-text-color) {
    28622853        color: inherit;
    28632854}
    28642855
     2856.is-style-outline .wp-block-button__link {
     2857        padding: calc(1.1em - 0.2rem) calc(1.44em - 0.2rem);
     2858}
     2859
    28652860/* Block: Columns ---------------------------- */
    28662861
    28672862.wp-block-column {
     
    30032998        max-width: none;
    30042999}
    30053000
     3001.wp-block-media-text__content > *:first-child {
     3002        margin-top: 0;
     3003}
     3004
    30063005.wp-block-media-text__content > *:last-child {
    30073006        margin-bottom: 0;
    30083007}
     
    43534352
    43544353        /* BLOCK: COLUMNS */
    43554354
    4356         .alignfull .wp-block-column > p:not(.has-background-color),
     4355        .alignfull:not(.has-background) .wp-block-column > p:not(.has-background-color),
    43574356        .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    43584357                max-width: calc(100% - 4rem);
    43594358                margin: auto;
    43604359        }
    43614360}
    43624361
    4363 @media ( min-width: 600px ) {
     4362@media ( min-width: 600px ) and ( max-width: 781px ) {
    43644363
    43654364        /* Blocks -------------------------------- */
    43664365
    43674366        /* BLOCK: COLUMNS */
    43684367
    4369         .alignfull .wp-block-column:nth-child(odd) > p:not(.has-background-color),
     4368        .alignfull:not(.has-background) .wp-block-column:nth-child(odd) > p:not(.has-background-color),
    43704369        .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    43714370                padding-left: 2rem;
    43724371        }
    43734372
    4374         .alignfull .wp-block-column:nth-child(even) > p:not(.has-background-color),
     4373        .alignfull:not(.has-background) .wp-block-column:nth-child(even) > p:not(.has-background-color),
    43754374        .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    43764375                padding-right: 2rem;
    43774376        }
     
    47884787        .author-bio {
    47894788                margin-top: 8rem;
    47904789                min-height: 8rem;
    4791                 padding-left: 10rem;
    47924790                position: relative;
    47934791        }
    47944792
    47954793        .author-bio .avatar {
    4796                 position: absolute;
    4797                 left: 0;
    4798                 top: 0;
    4799                 height: 8rem;
    48004794                width: 8rem;
    48014795        }
    48024796
     
    52775271
    52785272        /* BLOCK: COLUMNS */
    52795273
     5274        .wp-block-column {
     5275                margin-bottom: 0;
     5276        }
     5277
    52805278        .alignfull .wp-block-column:first-child > p,
    52815279        .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    52825280                padding-left: 2rem;
    52835281        }
    52845282
    5285         .alignfull .wp-block-column:last-child > p,
     5283        .alignfull:not(.has-background) .wp-block-column:last-child > p,
    52865284        .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    52875285                padding-right: 2rem;
    52885286        }
  • src/wp-content/themes/twentytwenty/template-parts/entry-author-bio.php

     
    99
    1010if ( (bool) get_the_author_meta( 'description' ) ) : ?>
    1111<div class="author-bio">
    12                 <h2 class="author-title heading-size-4">
    13                         <div class="author-avatar vcard">
    14                                 <?php echo get_avatar( get_the_author_meta( 'ID' ), 160 ); ?>
    15                         </div>
    16                         <span class="author-name">
    17                                 <?php
    18                                 printf(
    19                                         /* translators: %s: Author name */
    20                                         __( 'By %s', 'twentytwenty' ),
    21                                         esc_html( get_the_author() )
    22                                 );
    23                                 ?>
    24                         </span>
    25                 </h2>
    26                 <p class="author-description">
    27                         <?php the_author_meta( 'description' ); ?>
    28                         <a class="author-link" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
    29                                 <?php _e( 'View Archive &rarr;', 'twentytwenty' ); ?>
    30                         </a>
    31                 </p><!-- .author-description -->
     12                <?php echo get_avatar( get_the_author_meta( 'ID' ), 160 ); ?>
     13                <div class="author-info">
     14                        <h2 class="author-title heading-size-4">
     15                                        <?php
     16                                        printf(
     17                                                /* translators: %s: Author name */
     18                                                __( 'By %s', 'twentytwenty' ),
     19                                                esc_html( get_the_author() )
     20                                        );
     21                                        ?>
     22                        </h2>
     23                        <p class="author-description">
     24                                <?php the_author_meta( 'description' ); ?>
     25                                <a class="author-link" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
     26                                        <?php _e( 'View Archive &rarr;', 'twentytwenty' ); ?>
     27                                </a>
     28                        </p><!-- .author-description -->
     29                </div>
    3230</div><!-- .author-bio -->
    3331<?php endif; ?>
  • src/wp-content/themes/twentytwenty/template-parts/modal-menu.php

     
    99
    1010?>
    1111
    12 <div class="menu-modal cover-modal header-footer-group" data-modal-target-string=".menu-modal" aria-expanded="false">
     12<div class="menu-modal cover-modal header-footer-group" data-modal-target-string=".menu-modal">
    1313
    1414        <div class="menu-modal-inner modal-inner">
    1515
  • src/wp-content/themes/twentytwenty/template-parts/modal-search.php

     
    88 */
    99
    1010?>
    11 <div class="search-modal cover-modal header-footer-group" data-modal-target-string=".search-modal" aria-expanded="false">
     11<div class="search-modal cover-modal header-footer-group" data-modal-target-string=".search-modal">
    1212
    1313        <div class="search-modal-inner modal-inner">
    1414
     
    2222                        );
    2323                        ?>
    2424
    25                         <button class="toggle search-untoggle close-search-toggle fill-children-current-color" data-toggle-target=".search-modal" data-toggle-body-class="showing-search-modal" data-set-focus=".search-modal .search-field">
     25                        <button class="toggle search-untoggle close-search-toggle fill-children-current-color" data-toggle-target=".search-modal" data-toggle-body-class="showing-search-modal" data-set-focus=".search-modal .search-field" aria-expanded="false">
    2626                                <span class="screen-reader-text"><?php _e( 'Close search', 'twentytwenty' ); ?></span>
    2727                                <?php twentytwenty_the_theme_svg( 'cross' ); ?>
    2828                        </button><!-- .search-toggle -->