File tree 2 files changed +7
-3
lines changed
includes/wizards/newspack
src/components/src/box-contrast
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -248,11 +248,10 @@ public function get_dashboard_network_cards() {
248
248
*/
249
249
public function get_local_data () {
250
250
$ site_name = get_bloginfo ( 'name ' );
251
- $ theme_mods = get_theme_mods ();
252
251
$ local_data = [
253
252
'settings ' => [
254
253
'siteName ' => $ site_name ,
255
- 'headerBgColor ' => $ theme_mods [ ' header_color_hex ' ] ?? '' ,
254
+ 'headerBgColor ' => get_theme_mod ( ' primary_color_hex ' , ' #f0f0f0 ' ) ,
256
255
],
257
256
'sections ' => $ this ->get_dashboard (),
258
257
'plugins ' => get_plugins (),
Original file line number Diff line number Diff line change @@ -26,7 +26,12 @@ const BoxContrast = ( {
26
26
isInverted ?: boolean ;
27
27
className ?: string ;
28
28
} ) => {
29
- const contrastColor = getContrast ( hexColor ) ;
29
+ let contrastColor ;
30
+ if ( hexColor === '#f0f0f0' ) {
31
+ contrastColor = '#1e1e1e' ;
32
+ } else {
33
+ contrastColor = getContrast ( hexColor ) ;
34
+ }
30
35
const style = isInverted
31
36
? { color : hexColor , backgoundColor : contrastColor }
32
37
: { backgroundColor : hexColor , color : contrastColor } ;
You can’t perform that action at this time.
0 commit comments