Browse Source

explicitedly required the color utils file to avoid uncaught errors on child themes

Maggie Cabrera 4 years ago
parent
commit
1ce2e3c545
2 changed files with 5 additions and 5 deletions
  1. 0 5
      varia/functions.php
  2. 5 0
      varia/inc/wpcom-colors-css-variables.php

+ 0 - 5
varia/functions.php

@@ -518,11 +518,6 @@ function varia_customize_content_options( $wp_customize ) {
 }
 add_action( 'customize_register', 'varia_customize_content_options' );
 
-/*
- * Color palette related utilities
- */
-require get_template_directory() . '/inc/color-utils.php';
-
 /**
  * SVG Icons class.
  */

+ 5 - 0
varia/inc/wpcom-colors-css-variables.php

@@ -1,4 +1,9 @@
 <?php
+/*
+ * Color palette related utilities
+ */
+require_once get_template_directory() . '/inc/color-utils.php';
+
 // Custom Colors:
 function varia_define_color_annotations( $colors ) {
 	// Background Color