/**
  * Extra CSS needed for the footer if text needs to be white.
  */
 public function footer_css()
 {
     if ('#ffffff' == Daphnee_Customizer::max_readability(get_theme_mod('footer_background_color', '#333333'))) {
         $style = '#colophon.site-footer{color:#fff;}#colophon.site-footer a{color:rgba(255,255,255,.8);}';
         wp_add_inline_style('daphnee-style', $style);
     }
 }
Exemple #2
0
 if (!Daphnee()->is_plus) {
     Kirki::add_field('daphnee', array('type' => 'custom', 'settings' => 'headers_typography_plus', 'label' => '', 'section' => 'typography_headers', 'default' => Daphnee_Customizer::update_info_wrapper(__('Plus Options', 'daphnee'), __('Get extra options for headers typography: Font family, separate font-size & font-weight per header (h1, h2, h3, h4, h5 & h6)', 'daphnee')), 'priority' => 99));
 }
 /*******************************
  * COLORS
  ******************************/
 Kirki::add_field('daphnee', array('type' => 'color', 'settings' => 'links_color', 'label' => __('Links Color', 'daphnee'), 'description' => __('Select the main color for your site\\s links', 'daphnee'), 'default' => '#00BCD4', 'section' => 'colors', 'output' => array(array('element' => 'a, a:visited, a:hover', 'property' => 'color')), 'transport' => 'postMessage', 'js_vars' => array(array('element' => 'a, a:visited, a:hover', 'function' => 'css', 'property' => 'color'))));
 Kirki::add_field('daphnee', array('type' => 'color', 'settings' => 'buttons_color', 'label' => __('Buttons Color', 'daphnee'), 'description' => __('Select the main color for buttons', 'daphnee'), 'default' => '#C2185B', 'section' => 'colors', 'output' => array(array('element' => 'button, input[type="button"], input[type="reset"], input[type="submit"]', 'property' => 'background-color'), array('element' => 'button, input[type="button"], input[type="reset"], input[type="submit"]', 'property' => 'color', 'sanitize_callback' => array('Daphnee_Customizer', 'max_readability')))));
 Kirki::add_field('daphnee', array('type' => 'color-alpha', 'settings' => 'menu_color', 'label' => __('Menu Color', 'daphnee'), 'description' => __('Select the menu color', 'daphnee'), 'default' => '#000000', 'section' => 'colors', 'output' => array(array('element' => 'button.menu-toggle', 'property' => 'background-color'), array('element' => 'button.menu-toggle .dashicons', 'property' => 'color', 'sanitize_callback' => array('Daphnee_Customizer', 'max_readability')), array('element' => '#site-navigation.main-navigation', 'property' => 'background-color'), array('element' => '#site-navigation.main-navigation a', 'property' => 'color', 'sanitize_callback' => array('Daphnee_Customizer', 'max_readability')))));
 /*******************************
  * HEADER SECTION & OPTIONS
  ******************************/
 Kirki::add_section('header', array('title' => __('Header', 'daphnee'), 'description' => __('Configure your header options'), 'priority' => 40));
 Kirki::add_field('daphnee', array('type' => 'slider', 'settings' => 'header_height', 'label' => __('Header Height', 'daphnee'), 'description' => __('Select the height for the header.', 'daphnee'), 'section' => 'header', 'default' => 10, 'priority' => 15, 'choices' => array('min' => 1, 'max' => 100, 'step' => 1), 'output' => array(array('element' => '#masthead', 'property' => 'min-height', 'units' => 'vh')), 'transport' => 'postMessage', 'js_vars' => array(array('element' => '#masthead', 'function' => 'css', 'property' => 'min-height', 'units' => 'vh'))));
 if (!Daphnee()->is_plus) {
     Kirki::add_field('daphnee', array('type' => 'custom', 'settings' => 'plus_headers_info', 'label' => '', 'section' => 'header', 'default' => Daphnee_Customizer::update_info_wrapper(__('Plus Options', 'daphnee'), __('The plus pack includes many additional headers for your site!', 'Avada')), 'priority' => 99));
 }
 /*******************************
  * HEADER IMAGE OPTIONS
  ******************************/
 Kirki::add_field('daphnee', array('type' => 'color-alpha', 'settings' => 'header_color', 'label' => __('Header Color', 'daphnee'), 'section' => 'header_image', 'default' => '#ffffff', 'priority' => 1, 'output' => array(array('element' => '#masthead', 'property' => 'background-color', 'units' => '')), 'transport' => 'postMessage', 'js_vars' => array(array('element' => '#masthead', 'function' => 'css', 'property' => 'background-color', 'units' => ''))));
 Kirki::add_field('daphnee', array('type' => 'select', 'settings' => 'header_image_repeat', 'label' => __('Header Image Repeat', 'daphnee'), 'section' => 'header_image', 'default' => 'no-repeat', 'priority' => 20, 'choices' => array('initial' => __('Initial', 'daphnee'), 'inherit' => __('Inherit', 'daphnee'), 'repeat' => __('Repeat', 'daphnee'), 'no-repeat' => __('No repeat', 'daphnee'), 'repeat-x' => __('Repeat-X', 'daphnee'), 'repeat-y' => __('Repeat-Y', 'daphnee')), 'output' => array(array('element' => '#masthead', 'property' => 'background-repeat')), 'transport' => 'postMessage', 'js_vars' => array(array('element' => '#masthead', 'function' => 'css', 'property' => 'background-repeat'))));
 Kirki::add_field('daphnee', array('type' => 'select', 'settings' => 'header_image_size', 'label' => __('Header Image Size', 'daphnee'), 'section' => 'header_image', 'default' => 'cover', 'priority' => 30, 'choices' => array('initial' => __('Initial', 'daphnee'), 'inherit' => __('Inherit', 'daphnee'), 'cover' => __('Cover', 'daphnee'), 'contain ' => __('Contain', 'daphnee'), 'auto' => __('Auto', 'daphnee')), 'output' => array(array('element' => '#masthead', 'property' => 'background-size')), 'transport' => 'postMessage', 'js_vars' => array(array('element' => '#masthead', 'function' => 'css', 'property' => 'background-size'))));
 Kirki::add_field('daphnee', array('type' => 'select', 'settings' => 'header_image_attach', 'label' => __('Header Image Attachment', 'daphnee'), 'section' => 'header_image', 'default' => 'scroll', 'priority' => 40, 'choices' => array('initial' => __('Initial', 'daphnee'), 'inherit' => __('Inherit', 'daphnee'), 'scroll' => __('Scroll', 'daphnee'), 'fixed ' => __('Fixed', 'daphnee')), 'output' => array('element' => '#masthead', 'property' => 'background-attachment'), 'transport' => 'postMessage', 'js_vars' => array(array('element' => '#masthead', 'function' => 'css', 'property' => 'background-attachment'))));
 Kirki::add_field('daphnee', array('type' => 'select', 'settings' => 'header_image_position', 'label' => __('Header Image Position', 'daphnee'), 'section' => 'header_image', 'default' => 'center-center', 'priority' => 40, 'choices' => array('left-top' => __('Left Top', 'daphnee'), 'left-center' => __('Left Center', 'daphnee'), 'left-bottom' => __('Left Bottom', 'daphnee'), 'right-top' => __('Right Top', 'daphnee'), 'right-center' => __('Right Center', 'daphnee'), 'right-bottom' => __('Right Bottom', 'daphnee'), 'center-top' => __('Center Top', 'daphnee'), 'center-center' => __('Center Center', 'daphnee'), 'center-bottom' => __('Center Bottom', 'daphnee')), 'output' => array(array('element' => '#masthead', 'property' => 'background-position')), 'transport' => 'postMessage', 'js_vars' => array(array('element' => '#masthead', 'function' => 'css', 'property' => 'background-position'))));
 /*******************************
  * FOOTER
  ******************************/
 Kirki::add_section('footer', array('title' => __('Footer', 'daphnee'), 'priority' => 80));
 Kirki::add_field('daphnee', array('type' => 'slider', 'section' => 'footer', 'settings' => 'footer_widget_areas', 'label' => __('Number of Footer widget areas', 'daphnee'), 'default' => '3', 'choices' => array('min' => '1', 'max' => '4', 'step' => '1')));
 Kirki::add_field('daphnee', array('type' => 'background', 'settings' => 'footer_background', 'label' => __('Footer Background', 'daphnee'), 'section' => 'footer', 'default' => array('color' => '#333333', 'image' => '', 'repeat' => 'no-repeat', 'size' => 'cover', 'attach' => 'fixed', 'position' => 'center-center'), 'priority' => 50, 'output' => '#colophon.site-footer'));