Add a custom color preset for Theme options Styling sections
KLEO: Add a custom color preset for Theme options Styling sectionsStarting with KLEO 4.0 you can now define your own custom styling presets to apply to sections from Theme options - Styling. To add a custom color preset just add this code to your kleo-child/functions.php file and modify the values to match your needs:
add_filter('section_color_presets', 'kleo_my_add_custom_color_preset');function kleo_my_add_custom_color_preset( $presets ) {
$presets['my-preset-slug'] = array( 'alt' => 'My color preset name', 'img' => KLEO_LIB_URI . '/assets/images/presets/deep-purple-ac-amber.jpg', //path to custom image 'presets' => array( 'text' => '#ffffff', 'headings' => '#ffffff', 'bg' => '#673ab7', 'border' => 'transparent', 'link' => '#ffffff', 'link_hover' => '#d1c4e9', 'high_color' => '#ffffff', 'high_bg' => '#ffc107', 'alt_bg' => '#7e57c2', 'alt_border' => '#7e57c2', ) );
return $presets;}