Преглед на файлове

Friendly Business: Add missing editor color palette support

Danny Dudzic преди 6 години
родител
ревизия
ca4e6c1db1
променени са 1 файла, в които са добавени 32 реда и са изтрити 0 реда
  1. 32 0
      friendly-business/functions.php

+ 32 - 0
friendly-business/functions.php

@@ -32,6 +32,38 @@ function friendly_business_setup() {
 			'header-text' => array( 'site-title' ),
 		)
 	);
+
+	// Editor color palette.
+	add_theme_support(
+		'editor-color-palette',
+		array(
+			array(
+				'name'  => __( 'Primary', 'friendly-business' ),
+				'slug'  => 'primary',
+				'color' => '#20603c', // $color__link
+			),
+			array(
+				'name'  => __( 'Secondary', 'friendly-business' ),
+				'slug'  => 'secondary',
+				'color' => '#133a24', // $color__border-link-hover
+			),
+			array(
+				'name'  => __( 'Dark Brown', 'friendly-business' ),
+				'slug'  => 'dark-brown',
+				'color' => '#3c2323', // $color__text-main
+			),
+			array(
+				'name'  => __( 'Floral White', 'friendly-business' ),
+				'slug'  => 'floral-white',
+				'color' => '#fdf9ec', // $color__background-screen
+			),
+			array(
+				'name'  => __( 'White', 'friendly-business' ),
+				'slug'  => 'white',
+				'color' => '#ffffff',
+			),
+		)
+	);
 }
 endif; // friendly_business_setup
 add_action( 'after_setup_theme', 'friendly_business_setup', 30 );