public function test_kirki_fonts() { $this->assertEquals(Kirki_Fonts::get_all_fonts(), Kirki_Toolkit::fonts()->get_all_fonts()); $this->assertEquals(Kirki_Fonts::get_font_choices(), Kirki_Toolkit::fonts()->get_font_choices()); $this->assertEquals(Kirki_Fonts::is_google_font('Open Sans'), Kirki_Toolkit::fonts()->is_google_font('Open Sans')); $this->assertEquals(Kirki_Fonts::get_google_font_uri(array('Roboto')), Kirki_Toolkit::fonts()->get_google_font_uri(array('Roboto'))); $this->assertEquals(Kirki_Fonts::get_google_font_subsets(), Kirki_Toolkit::fonts()->get_google_font_subsets()); $this->assertEquals(Kirki_Fonts::choose_google_font_variants('Roboto'), Kirki_Toolkit::fonts()->choose_google_font_variants('Roboto')); $this->assertEquals(Kirki_Fonts::get_standard_fonts(), Kirki_Toolkit::fonts()->get_standard_fonts()); $this->assertEquals(Kirki_Fonts::get_font_stack(''), Kirki_Toolkit::fonts()->get_font_stack('')); $this->assertEquals(Kirki_Fonts::sanitize_font_choice(''), Kirki_Toolkit::fonts()->sanitize_font_choice('')); $this->assertEquals(Kirki_Fonts::get_google_fonts(), Kirki_Toolkit::fonts()->get_google_fonts()); }
public function test() { $this->assertEquals(kirki_get_option(), Kirki::get_option()); $this->assertEquals(kirki_sanitize_hex('#ffffff'), Kirki_Color::sanitize_hex('#ffffff')); $this->assertEquals(kirki_get_rgb('#ffffff'), Kirki_Color::get_rgb('#ffffff')); $this->assertEquals(kirki_get_rgba('#ffffff'), Kirki_Color::get_rgba('#ffffff')); $this->assertEquals(kirki_get_brightness('#ffffff'), Kirki_Color::get_brightness('#ffffff')); $font_registry = Kirki_Toolkit::fonts(); $this->assertEquals(Kirki_Fonts::get_all_fonts(), $font_registry->get_all_fonts()); $this->assertEquals(Kirki_Fonts::get_font_choices(), $font_registry->get_font_choices()); $this->assertEquals(Kirki_Fonts::is_google_font('foo'), $font_registry->is_google_font('foo')); $this->assertEquals(Kirki_Fonts::get_google_font_uri(array('foo')), $font_registry->get_google_font_uri(array('foo'))); $this->assertEquals(Kirki_Fonts::get_google_font_subsets(), $font_registry->get_google_font_subsets()); $this->assertEquals(Kirki_Fonts::choose_google_font_variants('Roboto'), $font_registry->choose_google_font_variants('Roboto')); $this->assertEquals(Kirki_Fonts::get_standard_fonts(), $font_registry->get_standard_fonts()); $this->assertEquals(Kirki_Fonts::get_font_stack('foo'), $font_registry->get_font_stack('foo')); $this->assertEquals(Kirki_Fonts::sanitize_font_choice('foo'), $font_registry->sanitize_font_choice('foo')); $this->assertEquals(Kirki_Fonts::get_google_fonts(), $font_registry->get_google_fonts()); }
public function __construct($control_name) { parent::__construct($control_name); //set up drop-down options for GWF fonts $this->setOptions(\Kirki_Fonts::get_google_font_subsets()); }
/** * Sanitizes typography controls * * @since 2.2.0 * @param array $value The value. * @return array */ public static function sanitize($value) { if (!is_array($value)) { return array(); } // Escape the font-family. if (isset($value['font-family'])) { $value['font-family'] = esc_attr($value['font-family']); } // Make sure we're using a valid variant. // We're adding checks for font-weight as well for backwards-compatibility // Versions 2.0 - 2.2 were using an integer font-weight. if (isset($value['variant']) || isset($value['font-weight'])) { if (isset($value['font-weight']) && !empty($value['font-weight'])) { if (!isset($value['variant']) || empty($value['variant'])) { $value['variant'] = $value['font-weight']; } unset($value['font-weight']); } $valid_variants = Kirki_Fonts::get_all_variants(); if (!array_key_exists($value['variant'], $valid_variants)) { $value['variant'] = 'regular'; } } // Make sure the saved value is "subsets" (plural) and not "subset". // This is for compatibility with older versions. if (isset($value['subset'])) { if (!empty($value['subset'])) { if (!isset($value['subsets']) || empty($value['subset'])) { $value['subsets'] = $value['subset']; } } unset($value['subset']); } // Make sure we're using a valid subset. if (isset($value['subsets'])) { $valid_subsets = Kirki_Fonts::get_google_font_subsets(); $subsets_ok = array(); if (is_array($value['subsets'])) { foreach ($value['subsets'] as $subset) { if (array_key_exists($subset, $valid_subsets)) { $subsets_ok[] = $subset; } } $value['subsets'] = $subsets_ok; } } // Sanitize the font-size. if (isset($value['font-size']) && !empty($value['font-size'])) { $value['font-size'] = Kirki_Sanitize_Values::css_dimension($value['font-size']); if (is_numeric($value['font-size'])) { $value['font-size'] .= 'px'; } } // Sanitize the line-height. if (isset($value['line-height']) && !empty($value['line-height'])) { $value['line-height'] = Kirki_Sanitize_Values::css_dimension($value['line-height']); } // Sanitize the letter-spacing. if (isset($value['letter-spacing']) && !empty($value['letter-spacing'])) { $value['letter-spacing'] = Kirki_Sanitize_Values::css_dimension($value['letter-spacing']); if (is_numeric($value['letter-spacing'])) { $value['letter-spacing'] .= 'px'; } } // Sanitize the text-align. if (isset($value['text-align']) && !empty($value['text-align'])) { if (!in_array($value['text-align'], array('inherit', 'left', 'center', 'right', 'justify'))) { $value['text-align'] = 'inherit'; } } // Sanitize the text-transform. if (isset($value['text-transform']) && !empty($value['text-transform'])) { if (!in_array($value['text-transform'], array('none', 'capitalize', 'uppercase', 'lowercase', 'initial', 'inherit'))) { $value['text-transform'] = 'none'; } } // Sanitize the color. if (isset($value['color']) && !empty($value['color'])) { $color = ariColor::newColor($value['color']); $value['color'] = $color->toCSS('hex'); } return $value; }
/** * Create the customizer controls. * Depends on the Kirki Customizer plugin. */ function create_settings($controls) { // Layout $controls[] = array('type' => 'radio-image', 'settings' => 'layout', 'label' => __('Layout', 'maera_zf'), 'section' => 'layout', 'priority' => 1, 'default' => 0, 'choices' => array(0 => get_template_directory_uri() . '/assets/images/1c.png', 1 => get_template_directory_uri() . '/assets/images/2cr.png', 2 => get_template_directory_uri() . '/assets/images/2cl.png')); $controls[] = array('type' => 'slider', 'settings' => 'layout_width', 'label' => __('Select max-width of main row class. Default: 1000px', 'maera_zf'), 'section' => 'layout', 'default' => 1000, 'priority' => 5, 'choices' => array('min' => 500, 'max' => 1900, 'step' => 1), 'output' => array('element' => '.row', 'property' => 'max-width', 'units' => 'px')); $controls[] = array('type' => 'select', 'settings' => 'sidebar_width', 'label' => __('Primary sidebar width', 'textdomain'), 'description' => __('Select the width of primary sidebar in a total of 12-column grid', 'maera_zf'), 'section' => 'layout', 'default' => 4, 'priority' => 10, 'choices' => array(2 => __('2/12', 'maera_zf'), 3 => __('3/12', 'maera_zf'), 4 => __('4/12', 'maera_zf'), 5 => __('5/12', 'maera_zf'), 6 => __('6/12', 'maera_zf'))); $controls[] = array('type' => 'switch', 'settings' => 'widget_panel', 'label' => __('Wrap primary sidebar widgets in panels', 'maera_zf'), 'section' => 'layout', 'default' => 0, 'priority' => 15); // Title & tagline $controls[] = array('type' => 'slider', 'settings' => 'logo_max_width', 'label' => __('Logo Maximum Width (1-12 columns)', 'maera_zf'), 'section' => 'title_tagline', 'default' => 3, 'priority' => 50, 'choices' => array('min' => 1, 'max' => 12, 'step' => 1)); // Colors $controls[] = array('type' => 'color', 'settings' => 'nav_bg', 'label' => __('Navbar Color', 'maera_zf'), 'section' => 'colors', 'default' => '#333333', 'output' => array('element' => '.top-bar, .top-bar-section li:not(.has-form) a:not(.button), .top-bar-section .has-form, .contain-to-grid.topbar', 'property' => 'background')); // Navigation $controls[] = array('type' => 'checkbox', 'settings' => 'navbar_search', 'label' => __('Display search form on the NavBar', 'maera_zf'), 'section' => 'nav', 'default' => 1); $controls[] = array('type' => 'toggle', 'settings' => 'navbar_width', 'label' => __('Navbar width', 'maera_zf'), 'description' => __('Select between full-with(default) or contained-to-grid', 'maera_zf'), 'section' => 'nav', 'default' => 0); $controls[] = array('type' => 'switch', 'settings' => 'navbar_sticky', 'label' => __('Sticky navbar?', 'maera_zf'), 'description' => __('Available only with a primary navigation selection.', 'maera_zf'), 'section' => 'nav', 'default' => 0); $controls[] = array('type' => 'switch', 'settings' => 'navbar_float', 'label' => __('Float right', 'maera_zf'), 'description' => __('Available only with a primary navigation selection.', 'maera_zf'), 'section' => 'nav', 'default' => 0); // Blog $controls[] = array('type' => 'checkbox', 'settings' => 'feat_img_archive', 'label' => __('Display Featured Images', 'maera_zf'), 'help' => __('Display featured Images on post archives ( such as categories, tags, month view etc ).', 'maera_zf'), 'section' => 'feat_archive', 'priority' => 50, 'default' => 0); $controls[] = array('type' => 'slider', 'settings' => 'feat_img_archive_width', 'label' => __('Featured Image Width', 'maera_zf'), 'description' => __('Set to -1 for max width and 0 for original width. Default: -1', 'maera_zf'), 'section' => 'feat_archive', 'priority' => 52, 'default' => -1, 'choices' => array('min' => -1, 'max' => 1900, 'step' => '1')); $controls[] = array('type' => 'slider', 'settings' => 'feat_img_archive_height', 'label' => __('Featured Image Height', 'maera_zf'), 'description' => __('Set to 0 to resize the image using the original image proportions. Default: 0', 'maera_zf'), 'section' => 'feat_archive', 'priority' => 53, 'default' => 0, 'choices' => array('min' => 0, 'max' => 1200, 'step' => '1')); $post_types = get_post_types(array('public' => true), 'names'); $controls[] = array('type' => 'multicheck', 'settings' => 'feat_img_per_post_type', 'label' => __('Disable featured images per post type.', 'maera_zf'), 'description' => __('CAUTION: This setting will also disable displaying the featured images on single posts as well.', 'maera_zf'), 'section' => 'feat_archive', 'priority' => 65, 'default' => '', 'choices' => $post_types); $controls[] = array('type' => 'checkbox', 'settings' => 'feat_img_post', 'label' => __('Display Featured Images', 'maera_zf'), 'description' => __('Display featured Images on single posts.', 'maera_zf'), 'section' => 'feat_single', 'priority' => 60, 'default' => 0); $controls[] = array('type' => 'slider', 'settings' => 'feat_img_post_width', 'label' => __('Featured Image Width', 'maera_zf'), 'description' => __('Set to -1 for max width and 0 for original width. Default: -1', 'maera_zf'), 'section' => 'feat_single', 'priority' => 62, 'default' => -1, 'choices' => array('min' => -1, 'max' => 1900, 'step' => '1')); $controls[] = array('type' => 'slider', 'settings' => 'feat_img_post_height', 'label' => __('Featured Image Height', 'maera_zf'), 'description' => __('Set to 0 to use the original image proportions. Default: 0', 'maera_zf'), 'section' => 'feat_single', 'priority' => 63, 'default' => 0, 'choices' => array('min' => 0, 'max' => 1200, 'step' => '1')); $controls[] = array('type' => 'radio-buttonset', 'settings' => 'blog_post_mode', 'label' => __('Archives Display Mode', 'maera_bs'), 'help' => __('Display the excerpt or the full post on post archives.', 'maera_bs'), 'section' => 'blog_options', 'priority' => 1, 'default' => 'excerpt', 'choices' => array('excerpt' => __('Excerpt', 'maera_bs'), 'full' => __('Full Post', 'maera_bs'))); $controls[] = array('type' => 'slider', 'settings' => 'post_excerpt_length', 'label' => __('Post excerpt length', 'maera_zf'), 'help' => __('Choose how many words should be used for post excerpt. Default: 55', 'maera_zf'), 'section' => 'blog_options', 'priority' => 10, 'default' => 55, 'choices' => array('min' => 10, 'max' => 150, 'step' => 1)); $controls[] = array('type' => 'text', 'settings' => 'post_excerpt_link_text', 'label' => __('"more" text', 'maera_zf'), 'description' => __('Text to display in case of excerpt too long. Default: Continued', 'maera_zf'), 'section' => 'blog_options', 'priority' => 12, 'default' => __('Continued', 'maera_bs')); // Backgrounds $controls[] = array('type' => 'background', 'settings' => 'body_bg', 'label' => __('Body background', 'maera_zf'), 'section' => 'body_background', 'default' => array('color' => '#ffffff', 'image' => null, 'repeat' => 'repeat', 'size' => 'inherit', 'attach' => 'inherit', 'position' => 'left-top', 'opacity' => 100), 'priority' => 5, 'output' => array('element' => 'body')); $controls[] = array('type' => 'background', 'settings' => 'footer_bg', 'label' => __('Footer background', 'maera_zf'), 'section' => 'footer_background', 'default' => array('color' => '#ffffff', 'image' => null, 'repeat' => 'repeat', 'size' => 'inherit', 'attach' => 'inherit', 'position' => 'left-top', 'opacity' => 100), 'priority' => 10, 'output' => array('element' => 'footer.page-footer')); // Footer $controls[] = array('type' => 'textarea', 'label' => __('Footer Text', 'maera_zf'), 'settings' => 'footer_text', 'default' => '© [year] [sitename]', 'section' => 'footer', 'priority' => 12, 'description' => __('The text that will be displayed in your footer. You can use [year] and [sitename] and they will be replaced appropriately. Default: © [year] [sitename]', 'maera_zf')); // Typography Navbar $controls[] = array('type' => 'select', 'settings' => 'font_menus_font_family', 'label' => __('Menus font', 'maera_zf'), 'section' => 'typo_nav', 'default' => '"Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;', 'priority' => 40, 'choices' => Kirki_Fonts::get_font_choices(), 'output' => array('element' => '.top-bar-section ul li > a, ul.off-canvas-list li a', 'property' => 'font-family')); $controls[] = array('type' => 'slider', 'settings' => 'font_menus_weight', 'description' => __('Font Weight', 'maera_zf'), 'section' => 'typo_nav', 'default' => 400, 'priority' => 43, 'choices' => array('min' => 100, 'max' => 800, 'step' => 100), 'output' => array('element' => '.top-bar-section ul li > a, ul.off-canvas-list li a', 'property' => 'font-weight')); $controls[] = array('type' => 'slider', 'settings' => 'font_menus_size', 'description' => __('Font Size', 'maera_zf'), 'section' => 'typo_nav', 'default' => 14, 'priority' => 44, 'choices' => array('min' => 10, 'max' => 30, 'step' => 1), 'output' => array('element' => '.top-bar-section ul li > a, ul.off-canvas-list li a', 'property' => 'font-size')); $controls[] = array('type' => 'slider', 'settings' => 'font_menus_height', 'description' => __('Line Height', 'maera_zf'), 'section' => 'typo_nav', 'default' => 1.6, 'priority' => 25, 'choices' => array('min' => 0, 'max' => 3, 'step' => 0.1), 'output' => array('element' => '.top-bar-section ul li > a, ul.off-canvas-list li a', 'property' => 'line-height')); // Typography Base $controls[] = array('type' => 'select', 'settings' => 'font_base_family', 'label' => __('Base font', 'maera_zf'), 'section' => 'typo_base', 'default' => '"Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;', 'priority' => 20, 'choices' => Kirki_Fonts::get_font_choices(), 'output' => array('element' => 'body', 'property' => 'font-family')); $controls[] = array('type' => 'multicheck', 'settings' => 'font_subsets', 'label' => __('Google-Font subsets', 'maera_zf'), 'description' => __('The subsets used from Google\'s API.', 'maera_bs'), 'section' => 'typo_base', 'default' => 'latin', 'priority' => 22, 'choices' => Kirki_Fonts::get_google_font_subsets(), 'output' => array('element' => 'body', 'property' => 'font-subset')); $controls[] = array('type' => 'slider', 'settings' => 'font_base_weight', 'label' => __('Base Font Weight', 'maera_zf'), 'section' => 'typo_base', 'default' => 400, 'priority' => 24, 'choices' => array('min' => 100, 'max' => 900, 'step' => 100), 'output' => array('element' => 'body', 'property' => 'font-weight')); $controls[] = array('type' => 'slider', 'settings' => 'font_base_size', 'label' => __('Base Font Size', 'maera_zf'), 'section' => 'typo_base', 'default' => 16, 'priority' => 25, 'choices' => array('min' => 7, 'max' => 48, 'step' => 1), 'output' => array('element' => 'body', 'property' => 'font-size', 'units' => 'px')); $controls[] = array('type' => 'slider', 'settings' => 'font_base_height', 'label' => __('Base Line Height', 'maera_zf'), 'section' => 'typo_base', 'default' => 1.6, 'priority' => 26, 'choices' => array('min' => 0, 'max' => 3, 'step' => 0.01), 'output' => array('element' => 'body', 'property' => 'line-height')); // Typography Headers $controls[] = array('type' => 'select', 'settings' => 'headers_font_family', 'label' => __('Font-Family', 'maera_zf'), 'section' => 'typo_headers', 'default' => '"Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;', 'priority' => 30, 'choices' => Kirki_Fonts::get_font_choices(), 'output' => array('element' => 'h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6', 'property' => 'font-family')); $controls[] = array('type' => 'slider', 'settings' => 'font_headers_weight', 'label' => __('Font Weight.', 'maera_zf') . ' ' . __('Default: ', 'maera_zf') . 400, 'section' => 'typo_headers', 'default' => 700, 'priority' => 34, 'choices' => array('min' => 100, 'max' => 900, 'step' => 100), 'output' => array('element' => 'h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6', 'property' => 'font-weight')); $controls[] = array('type' => 'slider', 'settings' => 'font_headers_size', 'label' => __('Font Size', 'maera_zf') . ' ' . __('Default: ', 'maera_zf') . '1', 'description' => __('The size defined here applies to H5. All other header elements are calculated porportionally, based on the base font size.', 'maera_zf'), 'section' => 'typo_headers', 'default' => 1, 'priority' => 35, 'choices' => array('min' => 0.1, 'max' => 3, 'step' => 0.01)); $controls[] = array('type' => 'slider', 'settings' => 'font_headers_height', 'label' => __('Line Height', 'maera_zf') . ' ' . __('Default: ', 'maera_zf') . '1.1', 'section' => 'typo_headers', 'default' => 1.1, 'priority' => 36, 'choices' => array('min' => 0, 'max' => 3, 'step' => 0.1), 'output' => array('element' => 'h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6', 'property' => 'line-height')); // Social links $controls[] = array('type' => 'radio', 'mode' => 'buttonset', 'settings' => 'navbar_social', 'label' => __('Display social links in the NavBar.', 'maera_zf'), 'section' => 'social', 'default' => 'off', 'choices' => array('off' => __('Off', 'maera_zf'), 'inline' => __('Inline', 'maera_zf'), 'dropdown' => __('Dropdown', 'maera_zf')), 'priority' => 1); $social_links = Maera_FZ_Social::social_networks(); $i = 0; foreach ($social_links as $social_link => $label) { $controls[] = array('type' => 'text', 'settings' => $social_link . '_link', 'label' => $label . ' ' . __('link', 'maera_zf'), 'section' => 'social', 'default' => '', 'priority' => 10 + $i); $i++; } // Advanced $controls[] = array('type' => 'textarea', 'settings' => 'css', 'label' => __('Custom CSS', 'maera_zf'), 'description' => __('You can write your custom CSS here. This code will appear in a script tag appended in the header section of the page.', 'maera_zf'), 'section' => 'advanced', 'priority' => 4, 'default' => ''); $controls[] = array('type' => 'textarea', 'settings' => 'js', 'label' => __('Custom JS', 'maera_zf'), 'description' => __('You can write your custom JavaScript/jQuery here. The code will be included in a script tag appended to the bottom of the page.', 'maera_zf'), 'section' => 'advanced', 'priority' => 6, 'default' => ''); return $controls; }
/** * Assets that have to be enqueued in 'customize_controls_enqueue_scripts'. */ public function customize_controls_enqueue_scripts() { // Get an array of all our fields. $fields = Kirki::$fields; // Do we have tooltips anywhere? $has_tooltips = false; foreach ($fields as $field) { if ($has_tooltips) { continue; } // Field has tooltip. if (isset($field['tooltip']) && !empty($field['tooltip'])) { $has_tooltips = true; } // Backwards-compatibility ("help" argument instead of "tooltip"). if (isset($field['help']) && !empty($field['help'])) { $has_tooltips = true; } } // If we have tooltips, enqueue the tooltips script. /* TODO: if ( $has_tooltips ) { */ wp_enqueue_script('kirki-tooltip', trailingslashit(Kirki::$url) . 'assets/js/tooltip.js', array('jquery', 'customize-controls', 'jquery-ui-tooltip')); /* TODO: } */ // Enqueue the reset script. wp_enqueue_script('kirki-reset', trailingslashit(Kirki::$url) . 'assets/js/reset.js', array('jquery', 'kirki-set-setting-value')); // Register kirki-functions. wp_register_script('kirki-set-setting-value', trailingslashit(Kirki::$url) . 'assets/js/functions/set-setting-value.js'); wp_register_script('kirki-validate-css-value', trailingslashit(Kirki::$url) . 'assets/js/functions/validate-css-value.js'); wp_register_script('kirki-notifications', trailingslashit(Kirki::$url) . 'assets/js/functions/notifications.js', array('kirki-l10n', 'kirki-validate-css-value')); // Register serialize.js. wp_register_script('serialize-js', trailingslashit(Kirki::$url) . 'assets/js/vendor/serialize.js'); // Register the color-alpha picker. wp_enqueue_style('wp-color-picker'); wp_register_script('wp-color-picker-alpha', trailingslashit(Kirki::$url) . 'assets/js/vendor/wp-color-picker-alpha.js', array('wp-color-picker'), '1.2', true); // Register the jquery-ui-spinner. wp_register_script('jquery-ui-spinner', trailingslashit(Kirki::$url) . 'assets/js/vendor/jquery-ui-spinner', array('jquery', 'jquery-ui-core', 'jquery-ui-button')); // Register codemirror. wp_register_script('codemirror', trailingslashit(Kirki::$url) . 'assets/js/vendor/codemirror/lib/codemirror.js', array('jquery')); // Register selectize. wp_register_script('selectize', trailingslashit(Kirki::$url) . 'assets/js/vendor/selectize.js', array('jquery')); // An array of control scripts and their dependencies. $scripts = array('checkbox' => array('jquery', 'customize-base'), 'code' => array('jquery', 'customize-base', 'codemirror'), 'color' => array('jquery', 'customize-base', 'wp-color-picker-alpha'), 'color-palette' => array('jquery', 'customize-base', 'jquery-ui-button'), 'dashicons' => array('jquery', 'customize-base'), 'date' => array('jquery', 'customize-base', 'jquery-ui-datepicker'), 'dimension' => array('jquery', 'customize-base', 'kirki-notifications'), 'dropdown-pages' => array('jquery', 'customize-base', 'selectize'), 'editor' => array('jquery', 'customize-base', 'kirki-l10n'), 'generic' => array('jquery', 'customize-base'), 'multicheck' => array('jquery', 'customize-base'), 'multicolor' => array('jquery', 'customize-base', 'wp-color-picker-alpha'), 'number' => array('jquery', 'customize-base', 'jquery-ui-spinner'), 'palette' => array('jquery', 'customize-base', 'jquery-ui-button'), 'preset' => array('jquery', 'customize-base', 'selectize', 'kirki-set-setting-value'), 'radio-buttonset' => array('jquery', 'customize-base'), 'radio-image' => array('jquery', 'customize-base'), 'radio' => array('jquery', 'customize-base'), 'repeater' => array('jquery', 'customize-base', 'jquery-ui-core', 'jquery-ui-sortable', 'kirki-l10n'), 'select' => array('jquery', 'customize-base', 'selectize'), 'slider' => array('jquery', 'customize-base'), 'sortable' => array('jquery', 'customize-base', 'jquery-ui-core', 'jquery-ui-sortable', 'serialize-js'), 'spacing' => array('jquery', 'customize-base', 'kirki-notifications'), 'switch' => array('jquery', 'customize-base'), 'toggle' => array('jquery', 'customize-base'), 'typography' => array('jquery', 'customize-base', 'selectize', 'wp-color-picker-alpha')); foreach ($scripts as $id => $dependencies) { wp_register_script('kirki-' . $id, trailingslashit(Kirki::$url) . 'assets/js/controls/' . $id . '.js', $dependencies, false, true); } // Add fonts to our JS objects. $google_fonts = Kirki_Fonts::get_google_fonts(); $standard_fonts = Kirki_Fonts::get_standard_fonts(); $all_variants = Kirki_Fonts::get_all_variants(); $all_subsets = Kirki_Fonts::get_google_font_subsets(); $standard_fonts_final = array(); foreach ($standard_fonts as $key => $value) { $standard_fonts_final[] = array('family' => $value['stack'], 'label' => $value['label'], 'subsets' => array(), 'is_standard' => true, 'variants' => array(array('id' => 'regular', 'label' => $all_variants['regular']), array('id' => 'italic', 'label' => $all_variants['italic']), array('id' => '700', 'label' => $all_variants['700']), array('id' => '700italic', 'label' => $all_variants['700italic']))); } $google_fonts_final = array(); foreach ($google_fonts as $family => $args) { $label = isset($args['label']) ? $args['label'] : $family; $variants = isset($args['variants']) ? $args['variants'] : array('regular', '700'); $subsets = isset($args['subsets']) ? $args['subsets'] : array(); $available_variants = array(); foreach ($variants as $variant) { if (array_key_exists($variant, $all_variants)) { $available_variants[] = array('id' => $variant, 'label' => $all_variants[$variant]); } } $available_subsets = array(); foreach ($subsets as $subset) { if (array_key_exists($subset, $all_subsets)) { $available_subsets[] = array('id' => $subset, 'label' => $all_subsets[$subset]); } } $google_fonts_final[] = array('family' => $family, 'label' => $label, 'variants' => $available_variants, 'subsets' => $available_subsets); } $final = array_merge($standard_fonts_final, $google_fonts_final); wp_localize_script('kirki-typography', 'kirkiAllFonts', $final); }
* LAYOUT SECTION & OPTIONS ******************************/ Kirki::add_section('layout', array('title' => __('Layout', 'daphnee'), 'description' => __('Configure your layout options', 'daphnee'), 'priority' => 10)); Kirki::add_field('daphnee', array('type' => 'radio-image', 'settings' => 'layout', 'label' => __('Layout', 'daphnee'), 'section' => 'layout', 'default' => '', 'priority' => 10, 'choices' => array('full-screen' => trailingslashit(get_template_directory_uri()) . 'inc/kirki/assets/images/1c.png', 'left-sidebar' => trailingslashit(get_template_directory_uri()) . 'inc/kirki/assets/images/2cl.png', 'right-sidebar' => trailingslashit(get_template_directory_uri()) . 'inc/kirki/assets/images/2cr.png'))); Kirki::add_field('daphnee', array('type' => 'slider', 'settings' => 'site_max_width', 'label' => __('Max Width', 'daphnee'), 'description' => __('Select the max-width for the main content area.', 'daphnee'), 'section' => 'layout', 'default' => 1020, 'priority' => 15, 'choices' => array('min' => 420, 'max' => 1600, 'step' => 1), 'output' => array(array('element' => '#content.row, #masthead .row', 'property' => 'max-width', 'units' => 'px')), 'transport' => 'postMessage', 'js_vars' => array(array('element' => '#content.row, #masthead .row', 'function' => 'css', 'property' => 'max-width', 'units' => 'px')))); Kirki::add_field('daphnee', array('type' => 'radio-buttonset', 'settings' => 'sidebar_width', 'label' => __('Sidebar Width (1-12 columns)', 'daphnee'), 'section' => 'layout', 'default' => '4', 'priority' => 10, 'choices' => array('3' => __('Narrow', 'daphnee'), '4' => __('Default', 'daphnee'), '5' => __('Wide', 'daphnee')), 'required' => array(array('setting' => 'layout', 'operator' => '!=', 'value' => 'full-screen')))); /******************************* * TYPOGRAPHY PANEL, SECTION & OPTIONS ******************************/ Kirki::add_panel('typography', array('priority' => 11, 'title' => __('Typography', 'daphnee'), 'description' => __('Typography options for this site', 'daphnee'))); Kirki::add_section('typography_base', array('title' => __('Base Typography', 'daphnee'), 'description' => __('Edit the global typography options for your site', 'dephnee'), 'panel' => 'typography')); Kirki::add_section('typography_headers', array('title' => __('Headers Typography', 'daphnee'), 'description' => __('Edit the headers typography options for your site', 'dephnee'), 'panel' => 'typography')); Kirki::add_field('daphnee', array('type' => 'slider', 'settings' => 'base_font_size', 'label' => __('Font Size', 'daphnee'), 'description' => __('Select the base font-size for your site. (The value below is in em\'s)', 'dephnee'), 'section' => 'typography_base', 'default' => 1, 'priority' => 1, 'choices' => array('min' => 0.6, 'max' => 3, 'step' => 0.01), 'output' => array(array('element' => 'body #primary, header#masthead', 'property' => 'font-size', 'units' => 'em')), 'transport' => 'postMessage', 'js_vars' => array(array('element' => 'body #primary, header#masthead', 'function' => 'css', 'property' => 'font-size', 'units' => 'em')))); Kirki::add_field('daphnee', array('type' => 'slider', 'settings' => 'base_font_size_side', 'label' => __('Sidebar Base Font Size', 'daphnee'), 'description' => __('Select the base font-size for your site. (The value below is in em\'s)', 'dephnee'), 'section' => 'typography_base', 'default' => 0.9, 'priority' => 1, 'choices' => array('min' => 0.6, 'max' => 3, 'step' => 0.01), 'output' => array(array('element' => 'body #secondary', 'property' => 'font-size', 'units' => 'em')), 'transport' => 'postMessage', 'js_vars' => array(array('element' => 'body #secondary', 'function' => 'css', 'property' => 'font-size', 'units' => 'em')))); Kirki::add_field('daphnee', array('type' => 'select2', 'settings' => 'base_font_family', 'label' => __('Font Family', 'daphnee'), 'section' => 'typography_base', 'default' => 'Roboto', 'priority' => 20, 'choices' => Kirki_Fonts::get_font_choices(), 'output' => array('element' => 'body', 'property' => 'font-family'))); Kirki::add_field('daphnee', array('type' => 'multicheck', 'settings' => 'base_font_subsets', 'label' => __('Google-Font subsets', 'daphnee'), 'description' => __('The subsets used from Google\'s API.', 'daphnee'), 'section' => 'typography_base', 'default' => 'all', 'priority' => 22, 'choices' => Kirki_Fonts::get_google_font_subsets(), 'output' => array(array('element' => 'body', 'property' => 'font-subset')))); Kirki::add_field('daphnee', array('type' => 'slider', 'settings' => 'base_typography_font_weight', 'label' => __('Font Weight', 'daphnee'), 'section' => 'typography_base', 'default' => 300, 'priority' => 24, 'choices' => array('min' => 100, 'max' => 900, 'step' => 100), 'output' => array(array('element' => 'body', 'property' => 'font-weight')))); Kirki::add_field('daphnee', array('type' => 'slider', 'settings' => 'headers_font_size', 'label' => __('Font Size', 'daphnee'), 'description' => __('Select the base font-size for your site. This is the font-size of <h4> elements. The others are automatically calculated based on this value (the value below is in em\'s)', 'dephnee'), 'section' => 'typography_headers', 'default' => 1, 'priority' => 1, 'choices' => array('min' => 0.6, 'max' => 3, 'step' => 0.01), 'output' => array(array('element' => 'h1', 'property' => 'font-size', 'units' => 'em', 'sanitize_callback' => array('Daphnee_Customizer', 'h1_sanitize_size')), array('element' => 'h2', 'property' => 'font-size', 'units' => 'em', 'sanitize_callback' => array('Daphnee_Customizer', 'h2_sanitize_size')), array('element' => 'h3', 'property' => 'font-size', 'units' => 'em', 'sanitize_callback' => array('Daphnee_Customizer', 'h3_sanitize_size')), array('element' => 'h4', 'property' => 'font-size', 'units' => 'em', 'sanitize_callback' => array('Daphnee_Customizer', 'h4_sanitize_size')), array('element' => 'h5', 'property' => 'font-size', 'units' => 'em', 'sanitize_callback' => array('Daphnee_Customizer', 'h5_sanitize_size')), array('element' => 'h6', 'property' => 'font-size', 'units' => 'em', 'sanitize_callback' => array('Daphnee_Customizer', 'h6_sanitize_size'))))); 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));
function settings_typo_base($controls) { $controls[] = array('type' => 'select', 'setting' => 'font_base_family', 'label' => __('Base font', 'maera_bs'), 'section' => 'typo_base', 'default' => '"Helvetica Neue", Helvetica, Arial, sans-serif', 'priority' => 20, 'choices' => Kirki_Fonts::get_font_choices(), 'output' => array('element' => 'body', 'property' => 'font-family')); $controls[] = array('type' => 'multicheck', 'setting' => 'font_subsets', 'label' => __('Google-Font subsets', 'maera_bs'), 'description' => __('The subsets used from Google\'s API.', 'maera_bs'), 'section' => 'typo_base', 'default' => 'latin', 'priority' => 22, 'choices' => Kirki_Fonts::get_google_font_subsets(), 'output' => array('element' => 'body', 'property' => 'font-subset')); $controls[] = array('type' => 'slider', 'setting' => 'font_base_weight', 'label' => __('Base Font Weight', 'maera_bs'), 'section' => 'typo_base', 'default' => 400, 'priority' => 24, 'choices' => array('min' => 100, 'max' => 900, 'step' => 100), 'output' => array('element' => 'body', 'property' => 'font-weight')); $controls[] = array('type' => 'slider', 'setting' => 'font_base_size', 'label' => __('Base Font Size', 'maera_bs'), 'section' => 'typo_base', 'default' => 14, 'priority' => 25, 'choices' => array('min' => 7, 'max' => 48, 'step' => 1), 'output' => array('element' => 'body', 'property' => 'font-size', 'units' => 'px')); $controls[] = array('type' => 'slider', 'setting' => 'font_base_height', 'label' => __('Base Line Height', 'maera_bs'), 'section' => 'typo_base', 'default' => 1.43, 'priority' => 26, 'choices' => array('min' => 0, 'max' => 3, 'step' => 0.01), 'output' => array('element' => 'body', 'property' => 'line-height')); return $controls; }
/** * Maera Restaurant Typography Settings * @since 1.0.0 * @param [type] $controls [description] * @return [type] [description] */ function maera_res_typography_settings($controls) { $controls[] = array('type' => 'select', 'settings' => 'content_font', 'label' => __('Content Font', 'maera-restaurant'), 'section' => 'maera_res_typography', 'default' => 'Open Sans', 'priority' => 1, 'choices' => Kirki_Fonts::get_font_choices(), 'output' => array('element' => 'body', 'property' => 'font-family')); $controls[] = array('type' => 'multicheck', 'setting' => 'content_font_subsets', 'label' => __('Font subsets', 'maera-restaurant'), 'description' => __('The subsets used from Google\'s API.', 'maera-restaurant'), 'section' => 'maera_res_typography', 'default' => 'all', 'priority' => 2, 'choices' => Kirki_Fonts::get_google_font_subsets(), 'output' => array('element' => 'body', 'property' => 'font-subset')); $controls[] = array('type' => 'color', 'settings' => 'content_font_color', 'label' => __('Content Font Color', 'maera-restaurant'), 'section' => 'maera_res_typography', 'default' => '#333333', 'priority' => 3, 'required' => array(array('setting' => 'color_pal', 'operator' => '==', 'value' => 0)), 'output' => array('element' => 'body p', 'property' => 'color')); $controls[] = array('type' => 'slider', 'settings' => 'content_font_size', 'label' => __('Content Font Size (px)', 'maera-restaurant'), 'section' => 'maera_res_typography', 'default' => 14, 'priority' => 4, 'choices' => array('min' => 7, 'max' => 48, 'step' => 1), 'output' => array('element' => 'body p', 'property' => 'font-size', 'units' => 'px')); $controls[] = array('type' => 'slider', 'settings' => 'content_font_weight', 'label' => __('Content Font Weight', 'maera-restaurant'), 'section' => 'maera_res_typography', 'default' => 300, 'priority' => 5, 'choices' => array('min' => 100, 'max' => 900, 'step' => 100), 'output' => array('element' => 'p', 'property' => 'font-weight')); $controls[] = array('type' => 'slider', 'settings' => 'navbar_font_size', 'label' => __('Navbar Font Size (px)', 'maera-restaurant'), 'section' => 'maera_res_typography', 'default' => 14, 'priority' => 6, 'choices' => array('min' => 7, 'max' => 48, 'step' => 1), 'output' => array(array('element' => '.navbar-default .navbar-nav > li > a', 'property' => 'font-size', 'units' => 'px'), array('element' => '.dropdown-menu > li > a', 'property' => 'font-size', 'units' => 'px'))); $controls[] = array('type' => 'slider', 'settings' => 'navbar_font_weight', 'label' => __('Navbar Font Weight', 'maera-restaurant'), 'section' => 'maera_res_typography', 'default' => 300, 'priority' => 7, 'choices' => array('min' => 100, 'max' => 900, 'step' => 100), 'output' => array('element' => '.navbar-default .navbar-nav > li > a', 'property' => 'font-weight')); $controls[] = array('type' => 'select', 'settings' => 'headers_font', 'label' => __('Header Fonts', 'maera-restaurant'), 'section' => 'maera_res_typography', 'default' => 'Open Sans', 'priority' => 8, 'choices' => Kirki_Fonts::get_font_choices(), 'output' => array('element' => 'h1,h2,h3,h4,h5,h6', 'property' => 'font-family')); $controls[] = array('type' => 'color', 'settings' => 'headers_font_color', 'label' => __('Header Font Color', 'maera-restaurant'), 'section' => 'maera_res_typography', 'default' => '#333333', 'priority' => 9, 'required' => array(array('setting' => 'color_pal', 'operator' => '==', 'value' => 0)), 'output' => array('element' => 'h1,h2,h3,h4,h5,h6', 'property' => 'color')); $controls[] = array('type' => 'slider', 'settings' => 'h1_font_size', 'label' => __('H1 Font Size (px)', 'maera-restaurant'), 'section' => 'maera_res_typography', 'default' => 22, 'priority' => 10, 'choices' => array('min' => 7, 'max' => 48, 'step' => 1), 'output' => array('element' => 'h1', 'property' => 'font-size', 'units' => 'px')); $controls[] = array('type' => 'slider', 'settings' => 'h2_font_size', 'label' => __('H2 Font Size (px)', 'maera-restaurant'), 'section' => 'maera_res_typography', 'default' => 20, 'priority' => 11, 'choices' => array('min' => 7, 'max' => 48, 'step' => 1), 'output' => array('element' => 'h2', 'property' => 'font-size', 'units' => 'px')); $controls[] = array('type' => 'slider', 'settings' => 'h3_font_size', 'label' => __('H3 Font Size (px)', 'maera-restaurant'), 'section' => 'maera_res_typography', 'default' => 18, 'priority' => 12, 'choices' => array('min' => 7, 'max' => 48, 'step' => 1), 'output' => array('element' => 'h3', 'property' => 'font-size', 'units' => 'px')); $controls[] = array('type' => 'slider', 'settings' => 'h4_font_size', 'label' => __('H4 Font Size (px)', 'maera-restaurant'), 'section' => 'maera_res_typography', 'default' => 16, 'priority' => 13, 'choices' => array('min' => 7, 'max' => 48, 'step' => 1), 'output' => array('element' => 'h4', 'property' => 'font-size', 'units' => 'px')); $controls[] = array('type' => 'slider', 'settings' => 'h5_font_size', 'label' => __('H5 Font Size (px)', 'maera-restaurant'), 'section' => 'maera_res_typography', 'default' => 14, 'priority' => 14, 'choices' => array('min' => 7, 'max' => 48, 'step' => 1), 'output' => array('element' => 'h5', 'property' => 'font-size', 'units' => 'px')); $controls[] = array('type' => 'slider', 'settings' => 'h6_font_size', 'label' => __('H6 Font Size (px)', 'maera-restaurant'), 'section' => 'maera_res_typography', 'default' => 12, 'priority' => 15, 'choices' => array('min' => 7, 'max' => 48, 'step' => 1), 'output' => array('element' => 'h6', 'property' => 'font-size', 'units' => 'px')); $controls[] = array('type' => 'slider', 'settings' => 'header_font_weight', 'label' => __('Headers Font Weight', 'maera-restaurant'), 'section' => 'maera_res_typography', 'default' => 600, 'priority' => 16, 'choices' => array('min' => 100, 'max' => 900, 'step' => 100), 'output' => array('element' => 'h1,h2,h3,h4,h5,h6', 'property' => 'font-weight')); return $controls; }
/** * Add our controls. */ function infiword_controls($controls) { //logo control $controls[] = array('type' => 'image', 'settings' => 'infiword_logo', 'label' => __('Upload your logo.', 'infiword'), 'description' => __('Please choose an image with atleast 200px width and 100px height for proper display of your logo.', 'infiword'), 'section' => 'logo_section', 'default' => '', 'priority' => 10); //logo width control $controls[] = array('type' => 'number', 'settings' => 'infiword_logo_width', 'label' => __('Edit the width of your logo.', 'infiword'), 'description' => __('Please choose a width between 200px and 400px for proper display of your logo.', 'infiword'), 'section' => 'logo_size_section', 'default' => 200, 'priority' => 10); //logo height control $controls[] = array('type' => 'number', 'settings' => 'infiword_logo_height', 'label' => __('Edit the height of your logo.', 'infiword'), 'description' => __('Please choose a width between 100px and 200px for proper display of your logo.', 'infiword'), 'section' => 'logo_size_section', 'default' => 100, 'priority' => 10); //search bar control $controls[] = array('type' => 'radio', 'settings' => 'infiword_show_search_bar', 'label' => __('Show the search bar.', 'infiword'), 'description' => __('Choose yes if you want to show the search bar.', 'infiword'), 'section' => 'search_bar_section', 'default' => 'yes', 'priority' => 10, 'choices' => array('yes' => __('Yes', 'infiword'), 'no' => __('No', 'infiword'))); //header ads control $controls[] = array('type' => 'image', 'settings' => 'infiword_header_advertisement', 'label' => __('Header ad image', 'infiword'), 'description' => __('Upload the image for the advertisement in the header.', 'infiword'), 'section' => 'header_ads_section', 'default' => '', 'priority' => 10); //header ads link $controls[] = array('type' => 'text', 'settings' => 'infiword_header_advertisement_link', 'label' => __('Header ad link', 'infiword'), 'description' => __('Type the url that the visitor will visit on clicking the header ad.', 'infiword'), 'section' => 'header_ads_section', 'default' => '', 'priority' => 10); // Custom Header image $controls[] = array('type' => 'image', 'settings' => 'infiword_custom_header_image', 'label' => __('Custom header image', 'infiword'), 'description' => __('Choose the image for your custom header.', 'infiword'), 'section' => 'infiword_custom_header_image_section', 'default' => '', 'priority' => 10); // Custom Header background $controls[] = array('type' => 'background', 'settings' => 'infiword_header_background', 'label' => __('Header background', 'infiword'), 'description' => __('Customize your header.', 'infiword'), 'section' => 'infiword_background_section', 'default' => array('color' => 'rgba(99,193,255,1)', 'image' => '', 'repeat' => 'no-repeat', 'size' => 'cover', 'attach' => 'fixed', 'position' => 'left-top', 'opacity' => 100), 'priority' => 10, 'output' => 'header.contain-to-grid'); //footer advertisement count control $controls[] = array('type' => 'radio', 'settings' => 'infiword_footer_advertisement_count', 'label' => __('Footer ads count', 'infiword'), 'description' => __('Choose the number of ads to be shown on the footer.', 'infiword'), 'section' => 'infiword_footer_advertisement_count_section', 'default' => 'off', 'priority' => 10, 'choices' => array('off' => __('Off', 'infiword'), 'one' => __('One', 'infiword'), 'two' => __('Two', 'infiword'), 'three' => __('Three', 'infiword'), 'four' => __('Four', 'infiword'))); //footer ads (one) $controls[] = array('type' => 'image', 'settings' => 'infiword_footer_advertisement_one', 'label' => __('Footer ad (one)', 'infiword'), 'description' => __('Choose the image to be shown on Footer ad (one).', 'infiword'), 'section' => 'infiword_footer_advertisement_one_section', 'default' => '', 'priority' => 10); //footer ads (one) link $controls[] = array('type' => 'text', 'settings' => 'infiword_footer_advertisement_one_link', 'label' => __('Footer ad (one) link', 'infiword'), 'description' => __('Type in the url that the user would visit on clicking the Footer ad (one).', 'infiword'), 'section' => 'infiword_footer_advertisement_one_section', 'default' => '', 'priority' => 10); //footer ads (two) $controls[] = array('type' => 'image', 'settings' => 'infiword_footer_advertisement_two', 'label' => __('Footer ad (two)', 'infiword'), 'description' => __('Choose the image to be shown on Footer ad (two).', 'infiword'), 'section' => 'infiword_footer_advertisement_two_section', 'default' => '', 'priority' => 10); //footer ads (two) link $controls[] = array('type' => 'text', 'settings' => 'infiword_footer_advertisement_two_link', 'label' => __('Footer ad (two) link', 'infiword'), 'description' => __('Type in the url that the user would visit on clicking the Footer ad (two).', 'infiword'), 'section' => 'infiword_footer_advertisement_two_section', 'default' => '', 'priority' => 10); //footer ads (three) $controls[] = array('type' => 'image', 'settings' => 'infiword_footer_advertisement_three', 'label' => __('Footer ad (three)', 'infiword'), 'description' => __('Choose the image to be shown on Footer ad (three).', 'infiword'), 'section' => 'infiword_footer_advertisement_three_section', 'default' => '', 'priority' => 10); //footer ads (three) link $controls[] = array('type' => 'text', 'settings' => 'infiword_footer_advertisement_three_link', 'label' => __('Footer ad (three) link', 'infiword'), 'description' => __('Type in the url that the user would visit on clicking the Footer ad (three).', 'infiword'), 'section' => 'infiword_footer_advertisement_three_section', 'default' => '', 'priority' => 10); //footer ads (four) $controls[] = array('type' => 'image', 'settings' => 'infiword_footer_advertisement_four', 'label' => __('Footer ad (four)', 'infiword'), 'description' => __('Choose the image to be shown on Footer ad (four).', 'infiword'), 'section' => 'infiword_footer_advertisement_four_section', 'default' => '', 'priority' => 10); //footer ads (four) link $controls[] = array('type' => 'text', 'settings' => 'infiword_footer_advertisement_four_link', 'label' => __('Footer ad (four) link', 'infiword'), 'description' => __('Type in the url that the user would visit on clicking the Footer ad (four).', 'infiword'), 'section' => 'infiword_footer_advertisement_four_section', 'default' => '', 'priority' => 10); //back to top button control $controls[] = array('type' => 'radio', 'settings' => 'infiword_footer_back_to_top', 'label' => __('Back to top', 'infiword'), 'description' => __('Show the back to top button.', 'infiword'), 'section' => 'infiword_footer_back_to_top_section', 'default' => 'yes', 'priority' => 10, 'choices' => array('yes' => __('Yes', 'infiword'), 'no' => __('No', 'infiword'))); //footer copyright text (left) $controls[] = array('type' => 'text', 'settings' => 'infiword_footer_copyright_text_left', 'label' => __('Footer copyright text (left)', 'infiword'), 'description' => __('Type what you want to be shown on the left side of the footer.', 'infiword'), 'section' => 'infiword_footer_copyright_text_left_section', 'default' => 'This is some default text', 'priority' => 10); //footer copyright text (right) $controls[] = array('type' => 'text', 'settings' => 'infiword_footer_copyright_text_right', 'label' => __('Footer copyright text (right)', 'infiword'), 'description' => __('Type what you want to be shown on the right side of the footer.', 'infiword'), 'section' => 'infiword_footer_copyright_text_right_section', 'default' => 'This is some default text', 'priority' => 10); //front page slider $controls[] = array('type' => 'radio', 'settings' => 'infiword_front_page_slider', 'label' => __('Front page slider', 'infiword'), 'description' => __('Choose whether to use the front page slider or not.', 'infiword'), 'section' => 'infiword_front_page_slider_section', 'default' => 'off', 'priority' => 10, 'choices' => array('on' => __('On', 'infiword'), 'off' => __('Off', 'infiword'))); // front page slider 1 image 1 $controls[] = array('type' => 'image', 'settings' => 'infiword_front_page_slider_1_image_1', 'label' => __('Front page slider 1 image 1', 'infiword'), 'description' => __('Choose the image to be shown on the first slide.', 'infiword'), 'section' => 'infiword_front_page_slider_section', 'default' => '', 'priority' => 10); //front page slider 1 image 1 link $controls[] = array('type' => 'text', 'settings' => 'infiword_front_page_slider_1_image_1_link', 'label' => __('Front page slider 1 image 1 link', 'infiword'), 'description' => __('Choose the link of the image to be shown on the first slide.', 'infiword'), 'section' => 'infiword_front_page_slider_section', 'default' => '', 'priority' => 10); //front page slider 1 image 2 $controls[] = array('type' => 'image', 'settings' => 'infiword_front_page_slider_1_image_2', 'label' => __('Front page slider 1 image 2', 'infiword'), 'description' => __('Choose the image to be shown on the second slide.', 'infiword'), 'section' => 'infiword_front_page_slider_section', 'default' => '', 'priority' => 10); //front page slider 1 image 2 link $controls[] = array('type' => 'text', 'settings' => 'infiword_front_page_slider_1_image_2_link', 'label' => __('Front page slider 1 image 2 link', 'infiword'), 'description' => __('Choose the link of the image to be shown on the second slide.', 'infiword'), 'section' => 'infiword_front_page_slider_section', 'default' => '', 'priority' => 10); // front page slider 1 image 3 $controls[] = array('type' => 'image', 'settings' => 'infiword_front_page_slider_1_image_3', 'label' => __('Front page slider 1 image 3', 'infiword'), 'description' => __('Choose the image to be shown on the third slide.', 'infiword'), 'section' => 'infiword_front_page_slider_section', 'default' => '', 'priority' => 10); //front page slider 1 image 3 link $controls[] = array('type' => 'text', 'settings' => 'infiword_front_page_slider_1_image_3_link', 'label' => __('Front page slider 1 image 3 link', 'infiword'), 'description' => __('Choose the link of the image to be shown on the third slide.', 'infiword'), 'section' => 'infiword_front_page_slider_section', 'default' => '', 'priority' => 10); // front page slider 1 image 4 $controls[] = array('type' => 'image', 'settings' => 'infiword_front_page_slider_1_image_4', 'label' => __('Front page slider 1 image 4', 'infiword'), 'description' => __('Choose the image to be shown on the fourth slide.', 'infiword'), 'section' => 'infiword_front_page_slider_section', 'default' => '', 'priority' => 10); //front page slider 1 image 4 link $controls[] = array('type' => 'text', 'settings' => 'infiword_front_page_slider_1_image_4_link', 'label' => __('Front page slider 1 image 4 link', 'infiword'), 'description' => __('Choose the link of the image to be shown on the fourth slide.', 'infiword'), 'section' => 'infiword_front_page_slider_section', 'default' => '', 'priority' => 10); // Custom home page slider 1 image 5 $controls[] = array('type' => 'image', 'settings' => 'infiword_front_page_slider_1_image_5', 'label' => __('Front page slider 1 image 5', 'infiword'), 'description' => __('Choose the image to be shown on the fifth slide.', 'infiword'), 'section' => 'infiword_front_page_slider_section', 'default' => '', 'priority' => 10); //front page slider 1 image 5 link $controls[] = array('type' => 'text', 'settings' => 'infiword_front_page_slider_1_image_5_link', 'label' => __('Front page slider 1 image 5 link', 'infiword'), 'description' => __('Choose the link of the image to be shown on the fifth slide.', 'infiword'), 'section' => 'infiword_front_page_slider_section', 'default' => '', 'priority' => 10); //pinterest style front page control $controls[] = array('type' => 'radio', 'settings' => 'infiword_front_page_layout_pinterest', 'label' => __('Pinterest style', 'infiword'), 'description' => __('Choose whether to use the Pinterest style or not.', 'infiword'), 'section' => 'infiword_front_page_layout_pinterest_section', 'default' => 'on', 'priority' => 10, 'choices' => array('on' => __('On', 'infiword'), 'off' => __('Off', 'infiword'))); //Front page column number $controls[] = array('type' => 'radio', 'settings' => 'infiword_front_page_column_count', 'label' => __('Front page column number', 'infiword'), 'description' => __('Number of columns for the front page.', 'infiword'), 'section' => 'infiword_front_page_column_count_section', 'default' => 'three', 'priority' => 10, 'choices' => array('one' => __('One', 'infiword'), 'two' => __('Two', 'infiword'), 'three' => __('Three', 'infiword'))); //Front page layout $controls[] = array('type' => 'radio-image', 'settings' => 'infiword_front_page_layout', 'label' => __('Front page layout', 'infiword'), 'description' => __('Choose the layout.', 'infiword'), 'section' => 'infiword_front_page_layout_section', 'default' => 'right-sidebar', 'priority' => 10, 'choices' => array('right-sidebar' => get_template_directory_uri() . '/kirki/assets/images/2cr.png', 'left-sidebar' => get_template_directory_uri() . '/kirki/assets/images/2cl.png', 'full-width' => get_template_directory_uri() . '/kirki/assets/images/1c.png', 'dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cm.png', 'left-dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cl.png', 'right-dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cr.png')); //Blog page layout $controls[] = array('type' => 'radio-image', 'settings' => 'infiword_blog_page_layout', 'label' => __('Blog page layout', 'infiword'), 'description' => __('Choose the layout.', 'infiword'), 'section' => 'infiword_blog_page_layout_section', 'default' => 'right-sidebar', 'priority' => 10, 'choices' => array('right-sidebar' => get_template_directory_uri() . '/kirki/assets/images/2cr.png', 'left-sidebar' => get_template_directory_uri() . '/kirki/assets/images/2cl.png', 'full-width' => get_template_directory_uri() . '/kirki/assets/images/1c.png', 'dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cm.png', 'left-dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cl.png', 'right-dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cr.png')); //Author page layout $controls[] = array('type' => 'radio-image', 'settings' => 'infiword_author_page_layout', 'label' => __('Author page layout', 'infiword'), 'description' => __('Choose the layout.', 'infiword'), 'section' => 'infiword_author_page_layout_section', 'default' => 'right-sidebar', 'priority' => 10, 'choices' => array('right-sidebar' => get_template_directory_uri() . '/kirki/assets/images/2cr.png', 'left-sidebar' => get_template_directory_uri() . '/kirki/assets/images/2cl.png', 'full-width' => get_template_directory_uri() . '/kirki/assets/images/1c.png', 'dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cm.png', 'left-dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cl.png', 'right-dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cr.png')); //Search page layout $controls[] = array('type' => 'radio-image', 'settings' => 'infiword_search_page_layout', 'label' => __('Search page layout', 'infiword'), 'description' => __('Choose the layout.', 'infiword'), 'section' => 'infiword_search_page_layout_section', 'default' => 'right-sidebar', 'priority' => 10, 'choices' => array('right-sidebar' => get_template_directory_uri() . '/kirki/assets/images/2cr.png', 'left-sidebar' => get_template_directory_uri() . '/kirki/assets/images/2cl.png', 'full-width' => get_template_directory_uri() . '/kirki/assets/images/1c.png', 'dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cm.png', 'left-dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cl.png', 'right-dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cr.png')); //Category page layout $controls[] = array('type' => 'radio-image', 'settings' => 'infiword_category_page_layout', 'label' => __('Category page layout', 'infiword'), 'description' => __('Choose the layout.', 'infiword'), 'section' => 'infiword_category_page_layout_section', 'default' => 'right-sidebar', 'priority' => 10, 'choices' => array('right-sidebar' => get_template_directory_uri() . '/kirki/assets/images/2cr.png', 'left-sidebar' => get_template_directory_uri() . '/kirki/assets/images/2cl.png', 'full-width' => get_template_directory_uri() . '/kirki/assets/images/1c.png', 'dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cm.png', 'left-dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cl.png', 'right-dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cr.png')); //Tag page layout $controls[] = array('type' => 'radio-image', 'settings' => 'infiword_tag_page_layout', 'label' => __('Tag page layout', 'infiword'), 'description' => __('Choose the layout.', 'infiword'), 'section' => 'infiword_tag_page_layout_section', 'default' => 'right-sidebar', 'priority' => 10, 'choices' => array('right-sidebar' => get_template_directory_uri() . '/kirki/assets/images/2cr.png', 'left-sidebar' => get_template_directory_uri() . '/kirki/assets/images/2cl.png', 'full-width' => get_template_directory_uri() . '/kirki/assets/images/1c.png', 'dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cm.png', 'left-dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cl.png', 'right-dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cr.png')); //Related posts $controls[] = array('type' => 'radio', 'settings' => 'infiword_show_related_posts', 'label' => __('Related posts', 'infiword'), 'description' => __('Choose whether to show related posts or not.', 'infiword'), 'section' => 'infiword_show_related_posts_section', 'default' => 'tags', 'priority' => 10, 'choices' => array('tags' => __('Tags', 'infiword'), 'category' => __('Category', 'infiword'), 'off' => __('Off', 'infiword'))); //Post navigation after every posts $controls[] = array('type' => 'radio', 'settings' => 'infiword_post_navigation', 'label' => __('Post navigation after every posts', 'infiword'), 'description' => __('Choose whether to show post navigation after every posts or not.', 'infiword'), 'section' => 'infiword_post_navigation_section', 'default' => 'yes', 'priority' => 10, 'choices' => array('yes' => __('Yes', 'infiword'), 'no' => __('No', 'infiword'))); //Post tags after every posts $controls[] = array('type' => 'radio', 'settings' => 'infiword_post_tags', 'label' => __('Post tags after every posts', 'infiword'), 'description' => __('Choose whether to show post tags after every posts or not.', 'infiword'), 'section' => 'infiword_post_tags_section', 'default' => 'yes', 'priority' => 10, 'choices' => array('yes' => __('Yes', 'infiword'), 'no' => __('No', 'infiword'))); //author bio $controls[] = array('type' => 'radio', 'settings' => 'infiword_author_bio', 'label' => __('Author bio', 'infiword'), 'description' => __('Choose whether to show author bio or not.', 'infiword'), 'section' => 'infiword_author_bio_section', 'default' => 'yes', 'priority' => 10, 'choices' => array('yes' => __('Yes', 'infiword'), 'no' => __('No', 'infiword'))); //Woocommerce page layout $controls[] = array('type' => 'radio-image', 'settings' => 'infiword_woocommerce_page_layout', 'label' => __('Woocommerce page layout.', 'infiword'), 'description' => __('Choose the layout.', 'infiword'), 'section' => 'infiword_woocommerce_page_layout_section', 'default' => 'right-sidebar', 'priority' => 10, 'choices' => array('right-sidebar' => get_template_directory_uri() . '/kirki/assets/images/2cr.png', 'left-sidebar' => get_template_directory_uri() . '/kirki/assets/images/2cl.png', 'full-width' => get_template_directory_uri() . '/kirki/assets/images/1c.png', 'dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cm.png', 'left-dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cl.png', 'right-dual-sidebar' => get_template_directory_uri() . '/kirki/assets/images/3cr.png')); //show social buttons $controls[] = array('type' => 'radio', 'settings' => 'infiword_social_buttons', 'label' => __('Social buttons', 'infiword'), 'description' => __('Choose whether to show social buttons or not.', 'infiword'), 'section' => 'infiword_social_buttons_section', 'default' => 'yes', 'priority' => 10, 'choices' => array('yes' => __('Yes', 'infiword'), 'no' => __('No', 'infiword'))); //facebook url $controls[] = array('type' => 'text', 'settings' => 'infiword_social_buttons_facebook', 'label' => __('Facebook url', 'infiword'), 'description' => __('Type in the full Facebook url.', 'infiword'), 'section' => 'infiword_social_buttons_facebook_section', 'default' => '', 'priority' => 10); //twitter url $controls[] = array('type' => 'text', 'settings' => 'infiword_social_buttons_twitter', 'label' => __('Twitter url', 'infiword'), 'description' => __('Type in the full Twitter url.', 'infiword'), 'section' => 'infiword_social_buttons_twitter_section', 'default' => '', 'priority' => 10); //linkedin url $controls[] = array('type' => 'text', 'settings' => 'infiword_social_buttons_linkedin', 'label' => __('Linkedin url', 'infiword'), 'description' => __('Type in the full Linkedin url.', 'infiword'), 'section' => 'infiword_social_buttons_linkedin_section', 'default' => '', 'priority' => 10); //pinterest url $controls[] = array('type' => 'text', 'settings' => 'infiword_social_buttons_pinterest', 'label' => __('Pinterest url', 'infiword'), 'description' => __('Type in the full Pinterest url.', 'infiword'), 'section' => 'infiword_social_buttons_pinterest_section', 'default' => '', 'priority' => 10); //github url $controls[] = array('type' => 'text', 'settings' => 'infiword_social_buttons_github', 'label' => __('Github url', 'infiword'), 'description' => __('Type in the full Github url.', 'infiword'), 'section' => 'infiword_social_buttons_github_section', 'default' => '', 'priority' => 10); //medium url $controls[] = array('type' => 'text', 'settings' => 'infiword_social_buttons_medium', 'label' => __('Medium url', 'infiword'), 'description' => __('Type in the full Medium url.', 'infiword'), 'section' => 'infiword_social_buttons_medium_section', 'default' => '', 'priority' => 10); //google plus url $controls[] = array('type' => 'text', 'settings' => 'infiword_social_buttons_google_plus', 'label' => __('Google Plus url', 'infiword'), 'description' => __('Type in the full Google Plus url.', 'infiword'), 'section' => 'infiword_social_buttons_google_plus_section', 'default' => '', 'priority' => 10); //youtube url $controls[] = array('type' => 'text', 'settings' => 'infiword_social_buttons_youtube', 'label' => __('Youtube url', 'infiword'), 'description' => __('Type in the full Youtube url.', 'infiword'), 'section' => 'infiword_social_buttons_youtube_section', 'default' => '', 'priority' => 10); //Category, tag, search and author page description background $controls[] = array('type' => 'background', 'settings' => 'infiword_category_tag_search_author_background', 'label' => __('Category, tag, search and author page description background', 'infiword'), 'section' => 'infiword_background_section', 'default' => array('color' => 'rgba(99,193,255,1)', 'image' => '', 'repeat' => 'no-repeat', 'size' => 'cover', 'attach' => 'fixed', 'position' => 'left-top', 'opacity' => 100), 'priority' => 10, 'output' => '.tag-query, .category-query, .author-query, .search-query'); //Body background $controls[] = array('type' => 'background', 'settings' => 'infiword_body_background', 'label' => __('Body background', 'infiword'), 'section' => 'infiword_background_section', 'default' => array('color' => '#ededed', 'image' => '', 'repeat' => 'no-repeat', 'size' => 'cover', 'attach' => 'fixed', 'position' => 'left-top', 'opacity' => 100), 'priority' => 10, 'output' => 'body'); //Article background $controls[] = array('type' => 'background', 'settings' => 'infiword_article_background', 'label' => __('Article background', 'infiword'), 'section' => 'infiword_background_section', 'default' => array('color' => '#fff', 'image' => '', 'repeat' => 'no-repeat', 'size' => 'cover', 'attach' => 'fixed', 'position' => 'left-top', 'opacity' => 100), 'priority' => 10, 'output' => '.page-card'); //Sidebar background $controls[] = array('type' => 'background', 'settings' => 'infiword_sidebar_background', 'label' => __('Sidebar background', 'infiword'), 'section' => 'infiword_background_section', 'default' => array('color' => 'rgba(255, 255, 255, 0.5)', 'image' => '', 'repeat' => 'no-repeat', 'size' => 'cover', 'attach' => 'fixed', 'position' => 'left-top', 'opacity' => 100), 'priority' => 10, 'output' => '#left-sidebar .panel, #left-dual-sidebar .panel, #sidebar .panel'); //Footer background $controls[] = array('type' => 'background', 'settings' => 'infiword_footer_background', 'label' => __('Footer background', 'infiword'), 'section' => 'infiword_background_section', 'default' => array('color' => '#faf9f9', 'image' => '', 'repeat' => 'no-repeat', 'size' => 'cover', 'attach' => 'fixed', 'position' => 'left-top', 'opacity' => 100), 'priority' => 10, 'output' => '.full-width.footer-widget'); //Footer advertisement background $controls[] = array('type' => 'background', 'settings' => 'infiword_footer_advertisement_background', 'label' => __('Footer advertisement background', 'infiword'), 'section' => 'infiword_background_section', 'default' => array('color' => '#333', 'image' => '', 'repeat' => 'no-repeat', 'size' => 'cover', 'attach' => 'fixed', 'position' => 'left-top', 'opacity' => 100), 'priority' => 10, 'output' => 'footer.full-width'); //Footer copyright background $controls[] = array('type' => 'background', 'settings' => 'infiword_footer_copyright_background', 'label' => __('Footer copyright background', 'infiword'), 'section' => 'infiword_background_section', 'default' => array('color' => '#33363b', 'image' => '', 'repeat' => 'no-repeat', 'size' => 'cover', 'attach' => 'fixed', 'position' => 'left-top', 'opacity' => 100), 'priority' => 10, 'output' => 'footer.full-width.copyright'); //Font color /*$controls[] = array( 'type' => 'color', 'settings' => 'infiword_general_font_color', 'label' => __( 'Font Color', 'infiword' ), 'section' => 'infiword_general_font_section', 'default' => '#de3495', 'priority' => 10, );*/ // general font $controls[] = array('type' => 'select', 'settings' => 'infiword_general_font_family', 'label' => __('Font Family', 'infiword'), 'section' => 'infiword_general_font_section', 'default' => 'Open Sans', 'priority' => 20, 'choices' => Kirki_Fonts::get_font_choices(), 'output' => array('element' => 'body, h1, h2, h3, h4, h5, h6, a, p', 'property' => 'font-family')); // general font $controls[] = array('type' => 'multicheck', 'settings' => 'infiword_general_body_font_subsets', 'label' => __('Google-Font subsets', 'infiword'), 'description' => __('The subsets used from Google\'s API.', 'infiword'), 'section' => 'infiword_general_font_section', 'default' => 'all', 'priority' => 22, 'choices' => Kirki_Fonts::get_google_font_subsets(), 'output' => array('element' => 'body, h1, h2, h3, h4, h5, h6, a, p', 'property' => 'font-subset')); // general font $controls[] = array('type' => 'slider', 'settings' => 'infiword_general_font_weight', 'label' => __('Font Weight', 'infiword'), 'section' => 'infiword_general_font_section', 'default' => 400, 'priority' => 24, 'choices' => array('min' => 100, 'max' => 900, 'step' => 100), 'output' => array('element' => 'body, h1, h2, h3, h4, h5, h6, a, p', 'property' => 'font-weight')); // general font $controls[] = array('type' => 'slider', 'settings' => 'infiword_general_font_size', 'label' => __('Font Size', 'infiword'), 'section' => 'infiword_general_font_section', 'default' => 16, 'priority' => 25, 'choices' => array('min' => 7, 'max' => 48, 'step' => 1), 'output' => array('element' => 'body, h1, h2, h3, h4, h5, h6, a, p', 'property' => 'font-size', 'units' => 'px')); // index page post title font $controls[] = array('type' => 'select', 'settings' => 'infiword_index_page_post_title_font_family', 'label' => __('Font Family', 'infiword'), 'section' => 'infiword_index_page_post_title_font_section', 'default' => 'Open Sans', 'priority' => 20, 'choices' => Kirki_Fonts::get_font_choices(), 'output' => array('element' => '.post-entry-meta h2 a', 'property' => 'font-family')); // index page post title font $controls[] = array('type' => 'multicheck', 'settings' => 'infiword_index_page_post_title_font_subsets', 'label' => __('Google-Font subsets', 'infiword'), 'description' => __('The subsets used from Google\'s API.', 'infiword'), 'section' => 'infiword_index_page_post_title_font_section', 'default' => 'all', 'priority' => 22, 'choices' => Kirki_Fonts::get_google_font_subsets(), 'output' => array('element' => '.post-entry-meta h2 a', 'property' => 'font-subset')); // index page post title font $controls[] = array('type' => 'slider', 'settings' => 'infiword_index_page_post_title_font_weight', 'label' => __('Font Weight', 'infiword'), 'section' => 'infiword_index_page_post_title_font_section', 'default' => 700, 'priority' => 24, 'choices' => array('min' => 100, 'max' => 900, 'step' => 100), 'output' => array('element' => '.post-entry-meta h2 a', 'property' => 'font-weight')); // index page post title font $controls[] = array('type' => 'slider', 'settings' => 'infiword_index_page_post_title_font_size', 'label' => __('Font Size', 'infiword'), 'section' => 'infiword_index_page_post_title_font_section', 'default' => 34, 'priority' => 25, 'choices' => array('min' => 7, 'max' => 48, 'step' => 1), 'output' => array('element' => '.post-entry-meta h2 a', 'property' => 'font-size', 'units' => 'px')); // blog page post body font $controls[] = array('type' => 'select', 'settings' => 'infiword_blog_page_post_body_font_family', 'label' => __('Font Family', 'infiword'), 'section' => 'infiword_blog_page_post_body_font_section', 'default' => 'Open Sans', 'priority' => 20, 'choices' => Kirki_Fonts::get_font_choices(), 'output' => array('element' => '.entry-content p, .entry-content ul, .entry-content dl, .entry-content ol, .entry-content a', 'property' => 'font-family')); // blog page post body font $controls[] = array('type' => 'multicheck', 'settings' => 'infiword_blog_page_post_body_font_subsets', 'label' => __('Google-Font subsets', 'infiword'), 'description' => __('The subsets used from Google\'s API.', 'infiword'), 'section' => 'infiword_blog_page_post_body_font_section', 'default' => 'all', 'priority' => 22, 'choices' => Kirki_Fonts::get_google_font_subsets(), 'output' => array('element' => '.entry-content p, .entry-content ul, .entry-content dl, .entry-content ol, .entry-content a', 'property' => 'font-subset')); // blog page post body font $controls[] = array('type' => 'slider', 'settings' => 'infiword_blog_page_post_body_font_weight', 'label' => __('Font Weight', 'infiword'), 'section' => 'infiword_blog_page_post_body_font_section', 'default' => 400, 'priority' => 24, 'choices' => array('min' => 100, 'max' => 900, 'step' => 100), 'output' => array('element' => '.entry-content p, .entry-content ul, .entry-content dl, .entry-content ol, .entry-content a', 'property' => 'font-weight')); // blog page post body font $controls[] = array('type' => 'slider', 'settings' => 'infiword_blog_page_post_body_font_size', 'label' => __('Font Size', 'infiword'), 'section' => 'infiword_blog_page_post_body_font_section', 'default' => 16, 'priority' => 25, 'choices' => array('min' => 7, 'max' => 48, 'step' => 1), 'output' => array('element' => '.entry-content p, .entry-content ul, .entry-content dl, .entry-content ol, .entry-content a', 'property' => 'font-size', 'units' => 'px')); // blog page post title font $controls[] = array('type' => 'select', 'settings' => 'infiword_blog_page_post_title_font_family', 'label' => __('Font Family', 'infiword'), 'section' => 'infiword_blog_page_post_title_font_section', 'default' => 'Lato', 'priority' => 20, 'choices' => Kirki_Fonts::get_font_choices(), 'output' => array('element' => 'h2.entry-title', 'property' => 'font-family')); // blog page post title font $controls[] = array('type' => 'multicheck', 'settings' => 'infiword_blog_page_post_title_font_subsets', 'label' => __('Google-Font subsets', 'infiword'), 'description' => __('The subsets used from Google\'s API.', 'infiword'), 'section' => 'infiword_blog_page_post_title_font_section', 'default' => 'all', 'priority' => 22, 'choices' => Kirki_Fonts::get_google_font_subsets(), 'output' => array('element' => 'h2.entry-title', 'property' => 'font-subset')); // blog page post title font $controls[] = array('type' => 'slider', 'settings' => 'infiword_blog_page_post_title_font_weight', 'label' => __('Font Weight', 'infiword'), 'section' => 'infiword_blog_page_post_title_font_section', 'default' => 700, 'priority' => 24, 'choices' => array('min' => 100, 'max' => 900, 'step' => 100), 'output' => array('element' => 'h2.entry-title', 'property' => 'font-weight')); // blog page post title font $controls[] = array('type' => 'slider', 'settings' => 'infiword_blog_page_post_title_font_size', 'label' => __('Font Size', 'infiword'), 'section' => 'infiword_blog_page_post_title_font_section', 'default' => 50, 'priority' => 25, 'choices' => array('min' => 7, 'max' => 48, 'step' => 1), 'output' => array('element' => 'h2.entry-title', 'property' => 'font-size', 'units' => 'px')); //Custom home page section 1 header text /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_homepage_header_section-1', 'label' => __( 'Custom home page section 1 header(string)', 'infiword' ), 'description' => __( 'Choose whether to show the custom home page section 1 header text or not.', 'infiword' ), 'section' => 'infiword_custom_homepage_header_section-1_section', 'default' => '', 'priority' => 10, );*/ //Custom home page section 2 header text /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_homepage_header_section-2', 'label' => __( 'Custom home page section 2 header(string)', 'infiword' ), 'description' => __( 'Choose whether to show the custom home page section 2 header text or not.', 'infiword' ), 'section' => 'infiword_custom_homepage_header_section-2_section', 'default' => '', 'priority' => 10, );*/ //Custom home page section 3 header text /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_homepage_header_section-3', 'label' => __( 'Custom home page section 3 header(string)', 'infiword' ), 'description' => __( 'Choose whether to show the custom home page section 3 header text or not.', 'infiword' ), 'section' => 'infiword_custom_homepage_header_section-3_section', 'default' => '', 'priority' => 10, );*/ //Custom home page section 4 header text /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_homepage_header_section-4', 'label' => __( 'Custom home page section 4 header(string)', 'infiword' ), 'description' => __( 'Choose whether to show the custom home page section 4 header text or not.', 'infiword' ), 'section' => 'infiword_custom_homepage_header_section-4_section', 'default' => '', 'priority' => 10, );*/ //Custom home page section 5 header text /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_homepage_header_section-5', 'label' => __( 'Custom home page section 5 header(string)', 'infiword' ), 'description' => __( 'Choose whether to show the custom home page section 5 header text or not.', 'infiword' ), 'section' => 'infiword_custom_homepage_header_section-5_section', 'default' => '', 'priority' => 10, );*/ /* ------------------------------------------------------------------------- * * TODO: Issue reported in Kirki /* ------------------------------------------------------------------------- */ //Custom home page section 5 editor /*$controls[] = array( 'type' => 'editor', 'settings' => 'infiword_custom_homepage_editor_section-5', 'label' => __( 'Custom home page section 6 editor text', 'infiword' ), 'description' => __( 'Customize the section 5 with you editor text.', 'infiword' ), 'section' => 'infiword_custom_homepage_header_section-5_section', 'default' => '', 'priority' => 10, );*/ //Custom home page section 6 header text /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_homepage_header_section-6', 'label' => __( 'Custom home page section 6 header(string)', 'infiword' ), 'description' => __( 'Choose whether to show the custom home page section 6 header text or not.', 'infiword' ), 'section' => 'infiword_custom_homepage_header_section-6_section', 'default' => '', 'priority' => 10, );*/ //Custom home page slider 1 /*$controls[] = array( 'type' => 'radio', 'settings' => 'infiword_custom_home_page_slider_1', 'label' => __( 'Custom home page slider 1', 'infiword' ), 'description' => __( 'Choose whether to show the custom home page slider 1 or not.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_1_section', 'default' => 'yes', 'priority' => 10, 'choices' => array( 'yes' => __( 'Yes', 'infiword' ), 'no' => __( 'No', 'infiword' ), ), );*/ // Custom home page slider 1 image 1 /*$controls[] = array( 'type' => 'image', 'settings' => 'infiword_custom_home_page_slider_1_image_1', 'label' => __( 'Custom home page slider 1 image 1', 'infiword' ), 'description' => __( 'Choose the image to be shown on the first slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_1_section', 'default' => '', 'priority' => 10, );*/ //Custom home page slider 1 image 1 link /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_home_page_slider_1_image_1_link', 'label' => __( 'Custom home page slider 1 image 1 link', 'infiword' ), 'description' => __( 'Choose the link of the image to be shown on the first slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_1_section', 'default' => '', 'priority' => 10, );*/ // Custom home page slider 1 image 2 /*$controls[] = array( 'type' => 'image', 'settings' => 'infiword_custom_home_page_slider_1_image_2', 'label' => __( 'Custom home page slider 1 image 2', 'infiword' ), 'description' => __( 'Choose the image to be shown on the second slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_1_section', 'default' => '', 'priority' => 10, );*/ //Custom home page slider 1 image 2 link /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_home_page_slider_1_image_2_link', 'label' => __( 'Custom home page slider 1 image 2 link', 'infiword' ), 'description' => __( 'Choose the link of the image to be shown on the second slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_1_section', 'default' => '', 'priority' => 10, );*/ // Custom home page slider 1 image 3 /*$controls[] = array( 'type' => 'image', 'settings' => 'infiword_custom_home_page_slider_1_image_3', 'label' => __( 'Custom home page slider 1 image 3', 'infiword' ), 'description' => __( 'Choose the image to be shown on the third slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_1_section', 'default' => '', 'priority' => 10, );*/ //Custom home page slider 1 image 3 link /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_home_page_slider_1_image_3_link', 'label' => __( 'Custom home page slider 1 image 3 link', 'infiword' ), 'description' => __( 'Choose the link of the image to be shown on the third slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_1_section', 'default' => '', 'priority' => 10, );*/ // Custom home page slider 1 image 4 /*$controls[] = array( 'type' => 'image', 'settings' => 'infiword_custom_home_page_slider_1_image_4', 'label' => __( 'Custom home page slider 1 image 4', 'infiword' ), 'description' => __( 'Choose the image to be shown on the fourth slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_1_section', 'default' => '', 'priority' => 10, );*/ //Custom home page slider 1 image 4 link /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_home_page_slider_1_image_4_link', 'label' => __( 'Custom home page slider 1 image 4 link', 'infiword' ), 'description' => __( 'Choose the link of the image to be shown on the fourth slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_1_section', 'default' => '', 'priority' => 10, );*/ // Custom home page slider 1 image 5 /*$controls[] = array( 'type' => 'image', 'settings' => 'infiword_custom_home_page_slider_1_image_5', 'label' => __( 'Custom home page slider 1 image 5', 'infiword' ), 'description' => __( 'Choose the image to be shown on the fifth slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_1_section', 'default' => '', 'priority' => 10, );*/ //Custom home page slider 1 image 5 link /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_home_page_slider_1_image_5_link', 'label' => __( 'Custom home page slider 1 image 5 link', 'infiword' ), 'description' => __( 'Choose the link of the image to be shown on the fifth slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_1_section', 'default' => '', 'priority' => 10, );*/ //Custom home page slider 2 /*$controls[] = array( 'type' => 'radio', 'settings' => 'infiword_custom_home_page_slider_2', 'label' => __( 'Custom home page slider 2', 'infiword' ), 'description' => __( 'Choose whether to show the custom home page slider 2 or not.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_2_section', 'default' => 'yes', 'priority' => 10, 'choices' => array( 'yes' => __( 'Yes', 'infiword' ), 'no' => __( 'No', 'infiword' ), ), );*/ // Custom home page slider 2 image 1 /*$controls[] = array( 'type' => 'image', 'settings' => 'infiword_custom_home_page_slider_2_image_1', 'label' => __( 'Custom home page slider 2 image 1', 'infiword' ), 'description' => __( 'Choose the image to be shown on the first slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_2_section', 'default' => '', 'priority' => 10, );*/ //Custom home page slider 2 image 1 link /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_home_page_slider_2_image_1_link', 'label' => __( 'Custom home page slider 2 image 1 link', 'infiword' ), 'description' => __( 'Choose the link of the image to be shown on the first slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_2_section', 'default' => '', 'priority' => 10, );*/ // Custom home page slider 2 image 2 /*$controls[] = array( 'type' => 'image', 'settings' => 'infiword_custom_home_page_slider_2_image_2', 'label' => __( 'Custom home page slider 2 image 2', 'infiword' ), 'description' => __( 'Choose the image to be shown on the second slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_2_section', 'default' => '', 'priority' => 10, );*/ //Custom home page slider 2 image 2 link /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_home_page_slider_2_image_2_link', 'label' => __( 'Custom home page slider 2 image 2 link', 'infiword' ), 'description' => __( 'Choose the link of the image to be shown on the second slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_2_section', 'default' => '', 'priority' => 10, );*/ // Custom home page slider 2 image 3 /*$controls[] = array( 'type' => 'image', 'settings' => 'infiword_custom_home_page_slider_2_image_3', 'label' => __( 'Custom home page slider 2 image 3', 'infiword' ), 'description' => __( 'Choose the image to be shown on the third slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_2_section', 'default' => '', 'priority' => 10, );*/ //Custom home page slider 2 image 3 link /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_home_page_slider_2_image_3_link', 'label' => __( 'Custom home page slider 2 image 3 link', 'infiword' ), 'description' => __( 'Choose the link of the image to be shown on the third slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_2_section', 'default' => '', 'priority' => 10, );*/ // Custom home page slider 2 image 4 /*$controls[] = array( 'type' => 'image', 'settings' => 'infiword_custom_home_page_slider_2_image_4', 'label' => __( 'Custom home page slider 2 image 4', 'infiword' ), 'description' => __( 'Choose the image to be shown on the fourth slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_2_section', 'default' => '', 'priority' => 10, );*/ //Custom home page slider 2 image 4 link /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_home_page_slider_2_image_4_link', 'label' => __( 'Custom home page slider 2 image 4 link', 'infiword' ), 'description' => __( 'Choose the link of the image to be shown on the fourth slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_2_section', 'default' => '', 'priority' => 10, );*/ // Custom home page slider 2 image 5 /*$controls[] = array( 'type' => 'image', 'settings' => 'infiword_custom_home_page_slider_2_image_5', 'label' => __( 'Custom home page slider 2 image 5', 'infiword' ), 'description' => __( 'Choose the image to be shown on the fifth slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_2_section', 'default' => '', 'priority' => 10, );*/ //Custom home page slider 2 image 5 link /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_home_page_slider_2_image_5_link', 'label' => __( 'This is the label', 'infiword' ), 'description' => __( 'Choose the link of the image to be shown on the fifth slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_slider_2_section', 'default' => '', 'priority' => 10, );*/ //Custom home page carousel 1 /*$controls[] = array( 'type' => 'radio', 'settings' => 'infiword_custom_home_page_carousel_1', 'label' => __( 'Custom home page carousel 1', 'infiword' ), 'description' => __( 'Choose whether to show the custom home page carousel 1 or not.', 'infiword' ), 'section' => 'infiword_custom_home_page_carousel_1_section', 'default' => 'yes', 'priority' => 10, 'choices' => array( 'yes' => __( 'Yes', 'infiword' ), 'no' => __( 'No', 'infiword' ), ), );*/ // Custom home page carousel 1 image 1 /*$controls[] = array( 'type' => 'image', 'settings' => 'infiword_custom_home_page_carousel_1_image_1', 'label' => __( 'Custom home page carousel 1 image 1', 'infiword' ), 'description' => __( 'Choose the image to be shown on the first slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_carousel_1_section', 'default' => '', 'priority' => 10, );*/ //Custom home page carousel 1 image 1 link /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_home_page_carousel_1_image_1_link', 'label' => __( 'Custom home page carousel 1 image 1 link', 'infiword' ), 'description' => __( 'Choose the link of the image to be shown on the first slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_carousel_1_section', 'default' => '', 'priority' => 10, );*/ // Custom home page carousel 1 image 2 /*$controls[] = array( 'type' => 'image', 'settings' => 'infiword_custom_home_page_carousel_1_image_2', 'label' => __( 'Custom home page carousel 1 image 2', 'infiword' ), 'description' => __( 'Choose the image to be shown on the second slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_carousel_1_section', 'default' => '', 'priority' => 10, );*/ //Custom home page carousel 1 image 2 link /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_home_page_carousel_1_image_2_link', 'label' => __( 'Custom home page carousel 1 image 2 link', 'infiword' ), 'description' => __( 'Choose the link of the image to be shown on the second slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_carousel_1_section', 'default' => '', 'priority' => 10, );*/ // Custom home page carousel 1 image 3 /*$controls[] = array( 'type' => 'image', 'settings' => 'infiword_custom_home_page_carousel_1_image_3', 'label' => __( 'Custom home page carousel 1 image 3', 'infiword' ), 'description' => __( 'Choose the image to be shown on the third slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_carousel_1_section', 'default' => '', 'priority' => 10, );*/ //Custom home page carousel 1 image 3 link /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_home_page_carousel_1_image_3_link', 'label' => __( 'Custom home page carousel 1 image 3 link', 'infiword' ), 'description' => __( 'Choose the link of the image to be shown on the third slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_carousel_1_section', 'default' => '', 'priority' => 10, );*/ // Custom home page carousel 1 image 4 /*$controls[] = array( 'type' => 'image', 'settings' => 'infiword_custom_home_page_carousel_1_image_4', 'label' => __( 'Custom home page carousel 1 image 4', 'infiword' ), 'description' => __( 'Choose the image to be shown on the fourth slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_carousel_1_section', 'default' => '', 'priority' => 10, );*/ //Custom home page carousel 1 image 4 link /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_home_page_carousel_1_image_4_link', 'label' => __( 'Custom home page carousel 1 image 4 link', 'infiword' ), 'description' => __( 'Choose the link of the image to be shown on the fourth slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_carousel_1_section', 'default' => '', 'priority' => 10, );*/ // Custom home page carousel 1 image 5 /*$controls[] = array( 'type' => 'image', 'settings' => 'infiword_custom_home_page_carousel_1_image_5', 'label' => __( 'Custom home page carousel 1 image 5', 'infiword' ), 'description' => __( 'Choose the image to be shown on the fifth slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_carousel_1_section', 'default' => '', 'priority' => 10, );*/ //Custom home page carousel 1 image 5 link /*$controls[] = array( 'type' => 'text', 'settings' => 'infiword_custom_home_page_carousel_1_image_5_link', 'label' => __( 'This is the label', 'infiword' ), 'description' => __( 'Choose the link of the image to be shown on the fifth slide.', 'infiword' ), 'section' => 'infiword_custom_home_page_carousel_1_section', 'default' => '', 'priority' => 10, );*/ return $controls; }