Skip to content

Commit

Permalink
Fix: Warnings on any theme using customizer colors. (#41136)
Browse files Browse the repository at this point in the history
* Fix: Warnings on any theme using customizer colors.

* changelog
  • Loading branch information
jorgefilipecosta authored Feb 7, 2025
1 parent c7e6c1f commit 3c6ee84
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Fix: Undefined array key warnings on any customizer theme with colors.
8 changes: 6 additions & 2 deletions projects/plugins/wpcomsh/custom-colors/colors.php
Original file line number Diff line number Diff line change
Expand Up @@ -1421,8 +1421,12 @@ public static function override_themecolors() {

$colors = $opts['colors'];

$colors['border'] = $colors['fg1'];
$colors['url'] = $colors['link'];
if ( isset( $colors['fg1'] ) ) {
$colors['border'] = $colors['fg1'];
}
if ( isset( $colors['link'] ) ) {
$colors['url'] = $colors['link'];
}
if ( isset( $colors['txt'] ) ) {
$colors['text'] = $colors['txt'];
}
Expand Down

0 comments on commit 3c6ee84

Please sign in to comment.