浏览代码

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

Maggie Cabrera 4 年之前
父节点
当前提交
1ce2e3c545
共有 2 个文件被更改,包括 5 次插入5 次删除
  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