Skip to content

Instantly share code, notes, and snippets.

@kuznacic
Created September 23, 2021 19:34
Show Gist options
  • Select an option

  • Save kuznacic/8b9a9b66311cf3c69b391fecbb27d509 to your computer and use it in GitHub Desktop.

Select an option

Save kuznacic/8b9a9b66311cf3c69b391fecbb27d509 to your computer and use it in GitHub Desktop.
WordPress Block Editor Color Palette
add_action( 'after_setup_theme', function() {
add_theme_support( 'editor-color-palette', array(
array(
'name' => __( 'one' ),
'slug' => 'one',
'color' => '#000000',
),
array(
'name' => __( 'two' ),
'slug' => 'two',
'color' => '#000000',
),
array(
'name' => __( 'three' ),
'slug' => 'three',
'color' => '#000000',
),
array(
'name' => __( 'four' ),
'slug' => 'four',
'color' => '#000000',
),
array(
'name' => __( 'five' ),
'slug' => 'five',
'color' => '#000000',
),
array(
'name' => __( 'six' ),
'slug' => 'six',
'color' => '#000000',
),
) );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment