|
@@ -212,14 +212,17 @@ class Seedlet_Custom_Colors {
|
|
$theme_css = ':root {';
|
|
$theme_css = ':root {';
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // Check to see if a custom background color has been set that is needed for our color calculation
|
|
|
|
+ // If this check isn't present, the color calculation generates a warning that an invalid color has been supplied
|
|
|
|
+ $theme_mod_bg_color = empty( get_theme_mod( "seedlet_--global--color-background" ) ) ? '#FFFFFF' : get_theme_mod( "seedlet_--global--color-background" );
|
|
|
|
+
|
|
foreach ( $this->seedlet_custom_color_variables as $variable ) {
|
|
foreach ( $this->seedlet_custom_color_variables as $variable ) {
|
|
|
|
|
|
- if ( '' !== get_theme_mod( "seedlet_$variable" ) ) {
|
|
|
|
|
|
+ if ( ! empty ( get_theme_mod( "seedlet_$variable[0]" ) ) ) {
|
|
|
|
|
|
$theme_mod_variable_name = $variable[0];
|
|
$theme_mod_variable_name = $variable[0];
|
|
$theme_mod_default_color = $variable[1];
|
|
$theme_mod_default_color = $variable[1];
|
|
$theme_mod_custom_color = get_theme_mod( "seedlet_$variable[0]" );
|
|
$theme_mod_custom_color = get_theme_mod( "seedlet_$variable[0]" );
|
|
- $theme_mod_bg_color = get_theme_mod( "seedlet_--global--color-background" );
|
|
|
|
$opacity_integer = 70;
|
|
$opacity_integer = 70;
|
|
$adjusted_color = $this->seedlet_color_blend_by_opacity( $theme_mod_custom_color, $opacity_integer, $theme_mod_bg_color );
|
|
$adjusted_color = $this->seedlet_color_blend_by_opacity( $theme_mod_custom_color, $opacity_integer, $theme_mod_bg_color );
|
|
|
|
|