Browse Source

Sophisticated Business: Add missing editor color palette support

Danny Dudzic 6 years ago
parent
commit
0443d627c7
1 changed files with 32 additions and 0 deletions
  1. 32 0
      sophisticated-business/functions.php

+ 32 - 0
sophisticated-business/functions.php

@@ -34,6 +34,38 @@ function sophisticated_business_setup() {
 			'header-text' => array( 'site-title' ),
 			'header-text' => array( 'site-title' ),
 		)
 		)
 	);
 	);
+
+	// Editor color palette.
+	add_theme_support(
+		'editor-color-palette',
+		array(
+			array(
+				'name'  => __( 'Primary', 'sophisticated-business' ),
+				'slug'  => 'primary',
+				'color' => '#caab57', // $color__link
+			),
+			array(
+				'name'  => __( 'Secondary', 'sophisticated-business' ),
+				'slug'  => 'secondary',
+				'color' => '#b59439', // $color__border-link-hover
+			),
+			array(
+				'name'  => __( 'Dark Blue', 'sophisticated-business' ),
+				'slug'  => 'dark-blue',
+				'color' => '#21759b', // $color__text-screen
+			),
+			array(
+				'name'  => __( 'Light Gray', 'sophisticated-business' ),
+				'slug'  => 'light-gray',
+				'color' => '#cccccc', // $color__text-light
+			),
+			array(
+				'name'  => __( 'White', 'sophisticated-business' ),
+				'slug'  => 'white',
+				'color' => '#ffffff',
+			),
+		)
+	);
 }
 }
 endif; // sophisticated_business_setup
 endif; // sophisticated_business_setup
 add_action( 'after_setup_theme', 'sophisticated_business_setup', 30 );
 add_action( 'after_setup_theme', 'sophisticated_business_setup', 30 );