Jelajahi Sumber

Calm Business: Add missing editor color palette support

Danny Dudzic 6 tahun lalu
induk
melakukan
b4292e27a6
1 mengubah file dengan 27 tambahan dan 0 penghapusan
  1. 27 0
      calm-business/functions.php

+ 27 - 0
calm-business/functions.php

@@ -32,6 +32,33 @@ if ( ! function_exists( 'calm_business_setup' ) ) {
                 'header-text' => array( 'site-title' ),
             )
         );
+
+        // Editor color palette.
+		add_theme_support(
+			'editor-color-palette',
+			array(
+				array(
+					'name'  => __( 'Primary', 'calm-business' ),
+					'slug'  => 'primary',
+					'color' => '#8D6708', // $color__link
+				),
+				array(
+					'name'  => __( 'Secondary', 'calm-business' ),
+					'slug'  => 'secondary',
+					'color' => '#5d4405', // $color__border-link-hover
+				),
+				array(
+					'name'  => __( 'Dark Gray', 'calm-business' ),
+					'slug'  => 'dark-gray',
+					'color' => '#242424', // $color__text-main
+				),
+				array(
+					'name'  => __( 'White', 'calm-business' ),
+					'slug'  => 'white',
+					'color' => '#ffffff', // $color__text-light
+				),
+			)
+		);
     }
 } // calm_business_setup
 add_action( 'after_setup_theme', 'calm_business_setup', 30 );