Last active
August 7, 2018 17:16
-
-
Save machelinos/5219a03921a08523024eab0603c39f4c to your computer and use it in GitHub Desktop.
Add basic support for Gutenberg wide align and editor palette colors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Add support for wide alignment odf images in Gutenberg */ | |
add_theme_support( 'align-wide' ); | |
/* Add 2 colors palette for the editor in Gutenberg */ | |
add_theme_support('editor-color-palette', | |
array( | |
array( | |
'name' => 'primary color', | |
'color' => '#02b3e4' | |
), | |
array( | |
'name' => 'secondary color', | |
'color' => '#09e1c0' | |
) | |
) | |
); | |
/* | |
Add style file to gutenberg editor views | |
*/ | |
function claserama_editor_styles(){ | |
wp_enqueue_style('google-fonts','https://fonts.googleapis.com/css?family=Fira+Sans:400,400i,700','1.0'); | |
wp_enqueue_style( 'claserama-editor-style', get_template_directory_uri() . '/assets/stylesheets/editor-style.css' ); | |
} | |
add_action('enqueue_block_editor_assets','claserama_editor_styles'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment