Skip to content

Instantly share code, notes, and snippets.

@ajmorris
Created June 23, 2020 12:13
Show Gist options
  • Save ajmorris/0c58af01a007380c163579eaf68a3560 to your computer and use it in GitHub Desktop.
Save ajmorris/0c58af01a007380c163579eaf68a3560 to your computer and use it in GitHub Desktop.
MU-Plugin for Theme Showdown 2020 - https://ithemes.com/training
<?php
/**
* Plugin Name: Theme Showdown 2020 Helper Plugin
* Plugin URI: https://www.ithemes.com/training
* Description: Plugin that includes handy helpful code snippets for Theme Showdown 2020
* Author: iThemes / AJ Morris
* Author URI: https://www.ithemes.com/training
* Text Domain: ithemes-training
* Domain Path: /languages
* Version: 1.0.0
*
*/
add_filter( 'generate_default_color_palettes', 'itmstraining_color_palettes' );
function itmstraining_color_palettes( $palettes ) {
$palettes = array(
'#3e3e58',
'#3dbdb6',
'#1e9bb1',
'#3dbdb6',
'#0289cd',
'#1272d0',
'#1d98d6',
'#1f2531',
'#ffffff',
'#39394d',
'#a2a1ae',
'#0b5e6e',
);
return $palettes;
}
add_action( 'after_setup_theme', function() {
add_theme_support( 'editor-color-palette', array(
array(
'name' => __( 'Dk purple' ),
'slug' => 'dk-purple',
'color' => '#3e3e58',
),
array(
'name' => __( 'Green' ),
'slug' => 'green',
'color' => '#3dbdb6',
),
array(
'name' => __( 'Orange' ),
'slug' => 'orange',
'color' => '#1e9bb1',
),
array(
'name' => __( 'Red' ),
'slug' => 'red',
'color' => '#3dbdb6',
),
array(
'name' => __( 'Blue' ),
'slug' => 'blue',
'color' => '#0289cd',
),
array(
'name' => __( 'Green' ),
'slug' => 'green',
'color' => '#1272d0',
),
array(
'name' => __( 'Orange' ),
'slug' => 'orange',
'color' => '#1d98d6',
),
array(
'name' => __( 'Red' ),
'slug' => 'red',
'color' => '#1f2531',
),
array(
'name' => __( 'White' ),
'slug' => 'white',
'color' => '#ffffff',
),
array(
'name' => __( 'Green' ),
'slug' => 'green',
'color' => '#39394d',
),
array(
'name' => __( 'Orange' ),
'slug' => 'orange',
'color' => '#a2a1ae',
),
array(
'name' => __( 'Red' ),
'slug' => 'red',
'color' => '#0b5e6e',
),
array(
'name' => __( 'Lt Gray' ),
'slug' => 'lt-gray',
'color' => '#f9fafa',
)
) );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment