Created
May 24, 2022 13:27
-
-
Save gydoar/0ae0286c05f9c3910c77bfabbce404c7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
/** | |
* Theme support Blocks | |
* @link https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/ | |
*/ | |
function andres_gutenberg_default_colors() | |
{ | |
// Color Palette Support | |
add_theme_support( | |
'editor-color-palette', | |
array( | |
array( | |
'name' => 'White', | |
'slug' => 'white', | |
'color' => '#ffffff' | |
), | |
array( | |
'name' => 'Black', | |
'slug' => 'black', | |
'color' => '#000000' | |
), array( | |
'name' => 'Pink', | |
'slug' => 'pink', | |
'color' => '#ff4444' | |
) | |
) | |
); | |
// Font Size Support | |
add_theme_support( | |
'editor-font-sizes', | |
array( | |
array( | |
'name' => 'Normal', | |
'slug' => 'normal', | |
'size' => '1rem' | |
), | |
array( | |
'name' => 'Medium', | |
'slug' => 'medium', | |
'size' => '1.5rem' | |
), | |
array( | |
'name' => 'Large', | |
'slug' => 'large', | |
'size' => '2rem' | |
), | |
array( | |
'name' => 'Extra Large', | |
'slug' => 'extra-large', | |
'size' => '2.5rem' | |
) | |
) | |
); | |
// Gradiente Color Support | |
add_theme_support( | |
'editor-gradient-presets', | |
array( | |
array( | |
'name' => esc_attr__('Vivid cyan blue to vivid purple', 'themeLangDomain'), | |
'gradient' => 'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)', | |
'slug' => 'vivid-cyan-blue-to-vivid-purple' | |
) | |
) | |
); | |
} | |
add_action('init', 'andres_gutenberg_default_colors'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment