瀏覽代碼

Spearhead: Show the Disable Dark Mode checkbox even if the colors aren't modified

Ben Dwyer 4 年之前
父節點
當前提交
3221a3a906
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      spearhead/inc/wpcom-colors.php

+ 2 - 2
spearhead/inc/wpcom-colors.php

@@ -26,7 +26,7 @@ if ( ! function_exists( 'spearhead_wpcom_customize_update' ) ) :
 			'fg2'  => '#fafbf6',
 		);
 
-		if ( $default_palette === $wpcom_colors_array['colors'] ) :
+		if ( ! $wpcom_colors_array['colors'] || $default_palette === $wpcom_colors_array['colors'] ) :
 			$wp_customize->add_setting( 'color_darkmode_disable' );
 			$wp_customize->add_control(
 				'color_darkmode_disable',
@@ -40,7 +40,7 @@ if ( ! function_exists( 'spearhead_wpcom_customize_update' ) ) :
 					'section'     => 'colors_manager_tool',
 					'priority'    => 10, // Set to 10 so it appears near the top of the Colors & Backgrounds panel
 					'type'        => 'checkbox',
-					'settings'	  => 'color_darkmode_disable'
+					'settings'    => 'color_darkmode_disable',
 				)
 			);
 		endif;