Make WordPress Core


Ignore:
Timestamp:
09/30/2019 05:40:14 PM (5 years 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 [46271], see https://github.com/WordPress/twentytwenty/compare/932b16248...dd7032f

Props anlino, ianbelanger, nielslange, acosmin, netweb, williampatton, adhitya03, phpdocs, acalfieri, itowhid06, littlebigthing, aristath, karmatosed, poena.
See #48110.

File:
1 edited

Legend:

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

    r46271 r46357  
    2424        $return = '';
    2525
    26         if ( ! $value ) {
     26        /*
     27         * Bail early if we have no $selector elements or properties and $value.
     28         */
     29        if ( ! $value || ! $selector ) {
    2730
    2831            return;
     
    5356
    5457        // Get variables.
    55         $body            = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'text' ) );
    56         $body_default    = '#000000';
    57         $accent          = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'accent' ) );
    58         $accent_default  = '#cd2653';
     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';
     62        /**
     63         * Filters the CSS selectors targetting button component on frontend to apply common css
     64         *
     65         * @since 1.0.0
     66         *
     67         * @param string $string   The comma separated string of all CSS selectors targetting button component
     68         */
    5969        $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\']' );
    6070
     
    91101                foreach ( $props as $key => $definitions ) {
    92102                    foreach ( $definitions as $property => $elements ) {
     103                        /*
     104                         * If we don't have an elements array or it is empty
     105                         * then skip this itteration early;
     106                         */
     107                        if ( ! is_array( $elements ) || empty( $elements ) ) {
     108                            continue;
     109                        }
    93110                        $val = twentytwenty_get_color_for_area( $context, $key );
    94111                        if ( $val ) {
     
    100117
    101118            if ( $cover && $cover !== $cover_default ) {
     119                twentytwenty_generate_css( '.overlay-header .header-inner', 'color', $cover );
    102120                twentytwenty_generate_css( '.cover-header .entry-header *', 'color', $cover );
    103121            }
Note: See TracChangeset for help on using the changeset viewer.