浏览代码

Varia: Remove unnecessary editor colors. Code tidying.

Allan Cole 5 年之前
父节点
当前提交
a28de42a7b
共有 2 个文件被更改,包括 15 次插入15 次删除
  1. 10 10
      varia/functions.php
  2. 5 5
      varia/inc/wpcom.php

+ 10 - 10
varia/functions.php

@@ -140,16 +140,16 @@ if ( ! function_exists( 'varia_setup' ) ) :
 			)
 		);
 
-		// $default_hue     = varia_get_default_hue();
-		// $saturation      = varia_get_default_saturation();
-		// $lightness       = varia_get_default_lightness();
-		// $lightness_hover = varia_get_default_lightness_hover();
-
-		$colors_array = get_theme_mod( 'colors_manager' );
-		$background   = $colors_array['colors']['bg'];
-		$primary      = $colors_array['colors']['link'];
-		$foreground   = $colors_array['colors']['txt'];
-		$secondary    = $colors_array['colors']['fg1'];
+		/*
+		 * Get customizer colors and add them to the editor color palettes
+		 *
+		 * - if the customizer color is empty, use the default
+		 */
+		$colors_array = get_theme_mod('colors_manager'); // color annotations array()
+		$background   = $colors_array['colors']['bg'];   // $config-global--color-background-default;
+		$primary      = $colors_array['colors']['link']; // $config-global--color-primary-default;
+		$foreground   = $colors_array['colors']['txt'];  // $config-global--color-foreground-default;
+		$secondary    = $colors_array['colors']['fg1'];  // $config-global--color-secondary-default;
 
 		// Editor color palette.
 		add_theme_support(

+ 5 - 5
varia/inc/wpcom.php

@@ -18,11 +18,11 @@ function varia_wpcom_setup() {
 	// Set theme colors for third party services.
 	if ( ! isset( $themecolors ) ) {
 		$themecolors = array(
-			'bg'     => 'ffffff',
-			'border' => '767676',
-			'text'   => '111111',
-			'link'   => '0073aa',
-			'url'    => '0073aa',
+			'bg'     => 'ffffff', // $config-global--color-background-default;
+			'border' => 'dddddd', // $config-global--color-border-default;
+			'text'   => '444444', // $config-global--color-foreground-default;
+			'link'   => '0000ff', // $config-global--color-primary-default;
+			'url'    => '0000ff', // $config-global--color-primary-default;
 		);
 	}
 }