- Timestamp:
- 09/30/2019 05:40:14 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwenty/inc/custom-css.php
r46271 r46357 24 24 $return = ''; 25 25 26 if ( ! $value ) { 26 /* 27 * Bail early if we have no $selector elements or properties and $value. 28 */ 29 if ( ! $value || ! $selector ) { 27 30 28 31 return; … … 53 56 54 57 // 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 */ 59 69 $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\']' ); 60 70 … … 91 101 foreach ( $props as $key => $definitions ) { 92 102 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 } 93 110 $val = twentytwenty_get_color_for_area( $context, $key ); 94 111 if ( $val ) { … … 100 117 101 118 if ( $cover && $cover !== $cover_default ) { 119 twentytwenty_generate_css( '.overlay-header .header-inner', 'color', $cover ); 102 120 twentytwenty_generate_css( '.cover-header .entry-header *', 'color', $cover ); 103 121 }
Note: See TracChangeset
for help on using the changeset viewer.