/** * Maera Restaurant Color and Styling Settings * @since 1.0.0 * @param [type] $controls [description] * @return [type] [description] */ function maera_res_styling_settings($controls) { $controls[] = array('type' => 'toggle', 'settings' => 'color_pal', 'label' => __('Color Palettes', 'maera-restaurant'), 'help' => __('Enabling will allow you to select from a range of color palettes to use.', 'maera-restaurant'), 'section' => 'maera_res_colors', 'default' => 0, 'priority' => 1); $controls[] = array('type' => 'palette', 'setting' => 'color_palette', 'label' => __('Color Palette', 'maera-restaurant'), 'description' => __('Select a pre-defined color palette to use.', 'maera-restaurant'), 'help' => __('Selecting a pre-defined color palette will automatically handle most of the colors and styling of the site.', 'maera-restaurant'), 'section' => 'maera_res_colors', 'default' => 1, 'priority' => 2, 'required' => array(array('setting' => 'color_pal', 'operator' => '==', 'value' => 1)), 'choices' => Maera_Restaurant_Styles::color_palettes()); $controls[] = array('type' => 'toggle', 'settings' => 'invert_palettes', 'label' => __('Invert Palettes', 'maera-restaurant'), 'section' => 'maera_res_colors', 'default' => 0, 'priority' => 3, 'required' => array(array('setting' => 'color_pal', 'operator' => '==', 'value' => 1))); $controls[] = array('type' => 'toggle', 'settings' => 'reverse_palettes', 'label' => __('Reverse Palettes', 'maera-restaurant'), 'section' => 'maera_res_colors', 'default' => 0, 'priority' => 4, 'required' => array(array('setting' => 'color_pal', 'operator' => '==', 'value' => 1))); $controls[] = array('type' => 'color', 'settings' => 'brand_color', 'label' => __('Primary Brand Color', 'maera-restaurant'), 'section' => 'maera_res_colors', 'default' => '#73A2BD', 'priority' => 5, 'required' => array(array('setting' => 'color_pal', 'operator' => '==', 'value' => 0)), 'output' => array(array('element' => '.btn-primary', 'property' => 'background-color'), array('element' => 'ul.social-share li a:hover', 'property' => 'background'), array('element' => '.navbar-default .navbar-nav > li > a:hover', 'property' => 'background-color'), array('element' => '.navbar-default .navbar-nav .dropdown-menu > li:hover > a, .navbar-default .navbar-nav .dropdown-menu > li:focus > a, .navbar-default .navbar-nav .dropdown-menu > li.active > a', 'property' => 'background-color'), array('element' => '.navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus, .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus', 'property' => 'background-color'), array('element' => '.prev, .next', 'property' => 'background-color'), array('element' => '#publish_date', 'property' => 'background'), array('element' => '.read-more', 'property' => 'background'), array('element' => '#bottom', 'property' => 'border-color'), array('element' => '.tagcloud a:hover', 'property' => 'background'), array('element' => 'ul.pagination > li.active > a, ul.pagination > li:hover > a', 'property' => 'background'))); $controls[] = array('type' => 'color', 'settings' => 'link_color', 'label' => __('Link Color', 'maera-restaurant'), 'section' => 'maera_res_colors', 'default' => '#73A2BD', 'priority' => 6, 'required' => array(array('setting' => 'color_pal', 'operator' => '==', 'value' => 0)), 'output' => array('element' => 'body a', 'property' => 'color')); $controls[] = array('type' => 'color', 'settings' => 'link_hover_color', 'label' => __('Link Hover Color', 'maera-restaurant'), 'section' => 'maera_res_colors', 'default' => '#86B4CF', 'priority' => 7, 'required' => array(array('setting' => 'color_pal', 'operator' => '==', 'value' => 0)), 'output' => array('element' => 'a:hover', 'property' => 'color')); $controls[] = array('type' => 'color', 'settings' => 'navbar_color', 'label' => __('Navbar Color', 'maera-restaurant'), 'section' => 'maera_res_colors', 'default' => '#222222', 'priority' => 8, 'required' => array(array('setting' => 'color_pal', 'operator' => '==', 'value' => 0)), 'output' => array('element' => '.navbar-default', 'property' => 'background-color')); return $controls; }
/** * Customize Kirki. * @return [type] [description] */ function customizer_config($config) { $colors = Maera_Restaurant_Styles::palette_colors(); $config['logo_image'] = MAERA_RES_SHELL_URL . '/assets/img/maera_restaurant_logo.png'; $config['description'] = __('The Maera restaurant shell allows you to easily create restaurant sites with ease and includes a wealth of customization options.', 'maera-restaurant'); $config['color_accent'] = $colors[4]; $config['color_back'] = $colors[5]; $config['width'] = '20%'; return $config; }