WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/29/2019 02:53:27 PM (6 weeks ago)
Author:
desrosj
Message:

Bundled Themes: Update Twenty Twenty.

This brings trunk’s version of Twenty Twenty in-sync with GitHub.

For a complete list of changes since [46571], see https://github.com/WordPress/twentytwenty/compare/4549fd9...dea9290.

Props anlino, ianbelanger, poena, williampatton, collet, erikkroes, torres126, intimez, byalextran, mehidi258, swapnild, nielslange.
Fixes #48450.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwenty/inc/custom-css.php

    r46571 r46613  
    6464        $accent            = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'accent' ) );
    6565        $accent_default    = '#cd2653';
    66 
    67         /**
    68          * Filters the CSS selectors targeting button component on frontend to apply common css
    69          *
    70          * @since 1.0.0
    71          *
    72          * @param string $string   The comma separated string of all CSS selectors targeting button component
    73          */
    74         $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\']' );
    7566
    7667        // Header.
     
    167158            // Accent color.
    168159            if ( $accent && $accent !== $accent_default ) {
    169                 twentytwenty_generate_css( 'body#tinymce.wp-editor a', 'color', $accent );
    170                 twentytwenty_generate_css( 'body#tinymce.wp-editor blockquote, body#tinymce.wp-editor .wp-block-quote', 'border-color', $accent, '', ' !important' );
    171                 twentytwenty_generate_css( $buttons_targets, 'background-color', $accent );
     160                twentytwenty_generate_css( 'body#tinymce.wp-editor.content a, body#tinymce.wp-editor.content a:focus, body#tinymce.wp-editor.content a:hover', 'color', $accent );
     161                twentytwenty_generate_css( 'body#tinymce.wp-editor.content blockquote, body#tinymce.wp-editor.content .wp-block-quote', 'border-color', $accent, '', ' !important' );
     162                twentytwenty_generate_css( 'body#tinymce.wp-editor.content button, body#tinymce.wp-editor.content .faux-button, body#tinymce.wp-editor.content .wp-block-button__link, body#tinymce.wp-editor.content .wp-block-file__button, body#tinymce.wp-editor.content input[type=\'button\'], body#tinymce.wp-editor.content input[type=\'reset\'], body#tinymce.wp-editor.content input[type=\'submit\']', 'background-color', $accent );
    172163            }
    173164
    174165            // Background color.
    175166            if ( $background && $background !== $background_default ) {
    176                 twentytwenty_generate_css( 'body#tinymce.wp-editor', 'background', '#' . $background );
     167                twentytwenty_generate_css( 'body#tinymce.wp-editor.content', 'background', '#' . $background );
     168            }
     169
     170            // Text color.
     171            if ( $body && $body !== $body_default ) {
     172                twentytwenty_generate_css( 'body#tinymce.wp-editor.content', 'color', $body );
     173            }
     174
     175            // Secondary color.
     176            if ( $secondary && $secondary !== $secondary_default ) {
     177                twentytwenty_generate_css( 'body#tinymce.wp-editor.content hr:not(.is-style-dots), body#tinymce.wp-editor.content cite, body#tinymce.wp-editor.content figcaption, body#tinymce.wp-editor.content .wp-caption-text, body#tinymce.wp-editor.content .wp-caption-dd, body#tinymce.wp-editor.content .gallery-caption', 'color', $secondary );
     178            }
     179
     180            // Borders color.
     181            if ( $borders && $borders !== $borders_default ) {
     182                twentytwenty_generate_css( 'body#tinymce.wp-editor.content pre, body#tinymce.wp-editor.content hr, body#tinymce.wp-editor.content fieldset,body#tinymce.wp-editor.content input, body#tinymce.wp-editor.content textarea', 'border-color', $borders );
    177183            }
    178184        }
Note: See TracChangeset for help on using the changeset viewer.