Make WordPress Core


Ignore:
Timestamp:
11/11/2019 09:03:55 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Bundled Themes: Update Twenty Twenty.

This brings Twenty Twenty in sync with GitHub. For a full list of changes since 5.3 RC4, see ​https://github.com/WordPress/twentytwenty/compare/c267289...ab5fa23.

Reviewed by SergeyBiryukov.
Props williampatton, poena, andersnoren, desrosj, schlessera, leprincenoir, alextran, aristath, b-07, allancole, karmatosed, pierlo, joen, ianbelanger.
See #48110, #48386, #48450, #48505.
Merges [46701], [46702], [46711] to the 5.3 branch.
Fixes #48557.

Location:
branches/5.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.3

  • branches/5.3/src/wp-content/themes/twentytwenty/functions.php

    r46669 r46712  
    2020 * WP Body Open
    2121 * Register Sidebars
    22  * Enqueue block editor assets
    23  * Enqueue classic editor styles
    24  * Block editor settings
     22 * Enqueue Block Editor Assets
     23 * Enqueue Classic Editor Styles
     24 * Block Editor Settings
    2525 */
    2626
    … …  
    120120        add_theme_support( 'align-wide' );
    121121
    122         // Adds starter content to highlight the theme on fresh sites.
    123         add_theme_support( 'starter-content', twentytwenty_get_starter_content() );
     122        /*
     123         * Adds starter content to highlight the theme on fresh sites.
     124         * This is done conditionally to avoid loading the starter content on every
     125         * page load, as it is a one-off operation only needed once in the customizer.
     126         */
     127        if ( is_customize_preview() ) {
     128                require get_template_directory() . '/inc/starter-content.php';
     129                add_theme_support( 'starter-content', twentytwenty_get_starter_content() );
     130        }
    124131
    125132        // Add theme support for selective refresh for widgets.
    … …  
    167174// Custom CSS.
    168175require get_template_directory() . '/inc/custom-css.php';
    169 
    170 // Custom starter content to highlight the theme on fresh sites.
    171 require get_template_directory() . '/inc/starter-content.php';
    172176
    173177/**
    … …  
    532536                                'shortName' => _x( 'M', 'Short name of the regular font size in the block editor.', 'twentytwenty' ),
    533537                                'size'      => 21,
    534                                 'slug'      => 'regular',
     538                                'slug'      => 'normal',
    535539                        ),
    536540                        array(
    … …  
    693697                'content'       => array(
    694698                        'accent'     => array(
    695                                 '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' ),
    696                                 'border-color' => array( 'blockquote', '.border-color-accent', '.border-color-accent-hover:hover', '.border-color-accent-hover:focus' ),
    697                                 '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' ),
    698                                 'fill'         => array( '.fill-children-accent', '.fill-children-accent *' ),
     699                                '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' ),
     700                                'border-color'     => array( 'blockquote', '.border-color-accent', '.border-color-accent-hover:hover', '.border-color-accent-hover:focus' ),
     701                                'background-color' => 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' ),
     702                                'fill'             => array( '.fill-children-accent', '.fill-children-accent *' ),
    699703                        ),
    700704                        'background' => array(
    701                                 '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' ),
    702                                 'background' => array( ':root .has-background-background-color' ),
     705                                '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', '.has-background.has-primary-background-color:not(.has-text-color)', '.has-background.has-primary-background-color *:not(.has-text-color)', '.has-background.has-accent-background-color:not(.has-text-color)', '.has-background.has-accent-background-color *:not(.has-text-color)' ),
     706                                'background-color' => array( ':root .has-background-background-color' ),
    703707                        ),
    704708                        'text'       => array(
    705                                 'color'      => array( 'body', '.entry-title a', ':root .has-primary-color' ),
    706                                 'background' => array( ':root .has-primary-background-color' ),
     709                                'color'            => array( 'body', '.entry-title a', ':root .has-primary-color' ),
     710                                'background-color' => array( ':root .has-primary-background-color' ),
    707711                        ),
    708712                        'secondary'  => array(
    709                                 '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' ),
    710                                 'background' => array( ':root .has-secondary-background-color' ),
     713                                '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' ),
     714                                'background-color' => array( ':root .has-secondary-background-color' ),
    711715                        ),
    712716                        'borders'    => array(
    713717                                'border-color'        => array( 'pre', 'fieldset', 'input', 'textarea', 'table', 'table *', 'hr' ),
    714                                 'background'          => array( 'caption', 'code', 'code', 'kbd', 'samp', '.wp-block-table.is-style-stripes tbody tr:nth-child(odd)', ':root .has-subtle-background-background-color' ),
     718                                'background-color'    => array( 'caption', 'code', 'code', 'kbd', 'samp', '.wp-block-table.is-style-stripes tbody tr:nth-child(odd)', ':root .has-subtle-background-background-color' ),
    715719                                'border-bottom-color' => array( '.wp-block-table.is-style-stripes' ),
    716720                                'border-top-color'    => array( '.wp-block-latest-posts.is-grid li' ),
    … …  
    720724                'header-footer' => array(
    721725                        'accent'     => array(
    722                                 'color'      => array( 'body:not(.overlay-header) .primary-menu > li > a', 'body:not(.overlay-header) .primary-menu > li > .icon', '.modal-menu a', '.footer-menu a, .footer-widgets a', '#site-footer .wp-block-button.is-style-outline', '.wp-block-pullquote:before', '.singular:not(.overlay-header) .entry-header a', '.archive-header a', '.header-footer-group .color-accent', '.header-footer-group .color-accent-hover:hover' ),
    723                                 'background' => array( '.social-icons a', '#site-footer button:not(.toggle)', '#site-footer .button', '#site-footer .faux-button', '#site-footer .wp-block-button__link', '#site-footer .wp-block-file__button', '#site-footer input[type="button"]', '#site-footer input[type="reset"]', '#site-footer input[type="submit"]' ),
     726                                'color'            => array( 'body:not(.overlay-header) .primary-menu > li > a', 'body:not(.overlay-header) .primary-menu > li > .icon', '.modal-menu a', '.footer-menu a, .footer-widgets a', '#site-footer .wp-block-button.is-style-outline', '.wp-block-pullquote:before', '.singular:not(.overlay-header) .entry-header a', '.archive-header a', '.header-footer-group .color-accent', '.header-footer-group .color-accent-hover:hover' ),
     727                                'background-color' => array( '.social-icons a', '#site-footer button:not(.toggle)', '#site-footer .button', '#site-footer .faux-button', '#site-footer .wp-block-button__link', '#site-footer .wp-block-file__button', '#site-footer input[type="button"]', '#site-footer input[type="reset"]', '#site-footer input[type="submit"]' ),
    724728                        ),
    725729                        'background' => array(
    726                                 'color'      => array( '.social-icons a', 'body:not(.overlay-header) .primary-menu ul', '.header-footer-group button', '.header-footer-group .button', '.header-footer-group .faux-button', '.header-footer-group .wp-block-button:not(.is-style-outline) .wp-block-button__link', '.header-footer-group .wp-block-file__button', '.header-footer-group input[type="button"]', '.header-footer-group input[type="reset"]', '.header-footer-group input[type="submit"]' ),
    727                                 'background' => array( '#site-header', '.footer-nav-widgets-wrapper', '#site-footer', '.menu-modal', '.menu-modal-inner', '.search-modal-inner', '.archive-header', '.singular .entry-header', '.singular .featured-media:before', '.wp-block-pullquote:before' ),
     730                                'color'            => array( '.social-icons a', 'body:not(.overlay-header) .primary-menu ul', '.header-footer-group button', '.header-footer-group .button', '.header-footer-group .faux-button', '.header-footer-group .wp-block-button:not(.is-style-outline) .wp-block-button__link', '.header-footer-group .wp-block-file__button', '.header-footer-group input[type="button"]', '.header-footer-group input[type="reset"]', '.header-footer-group input[type="submit"]' ),
     731                                'background-color' => array( '#site-header', '.footer-nav-widgets-wrapper', '#site-footer', '.menu-modal', '.menu-modal-inner', '.search-modal-inner', '.archive-header', '.singular .entry-header', '.singular .featured-media:before', '.wp-block-pullquote:before' ),
    728732                        ),
    729733                        'text'       => array(
    730734                                'color'               => array( '.header-footer-group', 'body:not(.overlay-header) #site-header .toggle', '.menu-modal .toggle' ),
    731                                 'background'          => array( 'body:not(.overlay-header) .primary-menu ul' ),
     735                                'background-color'    => array( 'body:not(.overlay-header) .primary-menu ul' ),
    732736                                'border-bottom-color' => array( 'body:not(.overlay-header) .primary-menu > li > ul:after' ),
    733737                                'border-left-color'   => array( 'body:not(.overlay-header) .primary-menu ul ul:after' ),
    … …  
    737741                        ),
    738742                        'borders'    => array(
    739                                 'border-color' => array( '.header-footer-group pre', '.header-footer-group fieldset', '.header-footer-group input', '.header-footer-group textarea', '.header-footer-group table', '.header-footer-group table *', '.footer-nav-widgets-wrapper', '#site-footer', '.menu-modal nav *', '.footer-widgets-outer-wrapper', '.footer-top' ),
    740                                 'background'  => array( '.header-footer-group table caption', 'body:not(.overlay-header) .header-inner .toggle-wrapper::before' ),
     743                                'border-color'     => array( '.header-footer-group pre', '.header-footer-group fieldset', '.header-footer-group input', '.header-footer-group textarea', '.header-footer-group table', '.header-footer-group table *', '.footer-nav-widgets-wrapper', '#site-footer', '.menu-modal nav *', '.footer-widgets-outer-wrapper', '.footer-top' ),
     744                                'background-color' => array( '.header-footer-group table caption', 'body:not(.overlay-header) .header-inner .toggle-wrapper::before' ),
    741745                        ),
    742746                ),
Note: See TracChangeset for help on using the changeset viewer.