'theme_mod', 'capability' => 'edit_theme_options', 'option_name' => 'bo', ) ); /** * Create panels using the Kirki API Kirki::add_panel( 'header', array( 'priority' => 10, 'title' => __( 'Header', 'theme_slug' ), 'description' => __( 'This panel will provide all the options of the header.', 'theme_slug' ), ) ); */ Kirki::add_section( 'layout_options', array( 'priority' => 10, 'title' => __( 'Layout options', 'kirki' ), 'description' => __( 'Choose Your Favorite Layout', 'kirki' ), // 'panel' => 'header', // Not typically needed. ) ); Kirki::add_section( 'design_options', array( 'priority' => 11, 'title' => __( 'Design options', 'kirki' ), 'description' => __( 'This panel contains all Design Options', 'kirki' ), ) ); Kirki::add_section( 'home_options', array( 'priority' => 10, 'title' => __( 'Home Page', 'kirki' ), 'description' => __( 'Home Page Options', 'kirki' ), ) ); Kirki::add_section( 'footer_options', array( 'priority' => 11, 'title' => __( 'Footer Options', 'kirki' ), 'description' => __( 'Footer Options', 'kirki' ), ) ); Kirki::add_section( 'custom_fields', array( 'priority' => 12, 'title' => __( 'Custom Fields', 'kirki' ), 'description' => __( 'This panel contains Custom Fields', 'kirki' ), ) ); /** * Add text fields */ function kirki_text_controls_fields( $fields ) { $fields[] = array( 'type' => 'radio-image', 'settings' => 'opt_layout', 'label' => __( 'Choose Layout', 'kirki' ), 'description' => __( 'Choose between No Sidebar, Left Sidebar, Right Sidebar or Double Sidebar templates', 'kirki' ), 'section' => 'layout_options', 'default' => '3', 'priority' => 11, 'choices' => array( '1' => get_template_directory_uri().'/inc/adm/kirki/assets/images/1col.png', '2' => get_template_directory_uri().'/inc/adm/kirki/assets/images/2cl.png', '3' => get_template_directory_uri().'/inc/adm/kirki/assets/images/2cr.png', '4' => get_template_directory_uri().'/inc/adm/kirki/assets/images/3cm.png', ), ); /* $fields[] = array( 'type' => 'checkbox', 'setting' => 'opt_sidebar_visibility', 'label' => __( 'Sidebar Visibility', 'kirki' ), 'description' => __( 'Uncheck the box if you would like to hide Sidebar site-wide ', 'kirki' ), 'section' => 'layout_options', 'default' => '0', 'priority' => 12, ); */ $fields[] = array( 'sanitize_callback' => array( 'Kirki_Sanitize', 'unfiltered' ), 'type' => 'textarea', 'settings' => 'opt_custom_style', 'label' => __( 'Custom CSS', 'kirki' ), 'description' => __( 'Add Your Custom CSS Here', 'kirki' ), 'section' => 'custom_fields', 'default' => '', 'priority' => 11, ); $fields[] = array( 'type' => 'radio-buttonset', 'settings' => 'opt_default_width', 'label' => __( 'Chose Width', 'kirki' ), 'description' => __( 'Chose Your Preferred Default Site Width', 'kirki' ), 'section' => 'layout_options', 'default' => 'option-2', 'priority' => 10, 'choices' => array( 'option-1' => __( '980px', 'kirki' ), 'option-2' => __( '1312px', 'kirki' ), ), ); $fields[] = array( 'sanitize_callback' => array( 'Kirki_Sanitize', 'unfiltered' ), 'type' => 'textarea', 'settings' => 'opt_copyright', 'label' => __( 'Copyright', 'kirki' ), 'description' => __( 'Edit Copyright Text', 'kirki' ), 'help' => __( 'This text will be displayed after Footer Menu', 'kirki' ), 'section' => 'custom_fields', 'default' => 'Copyright (c) Your Company', 'priority' => 11, ); $fields[] = array( 'type' => 'upload', 'settings' => 'opt_logo', 'label' => __( 'Logo', 'kirki' ), 'description' => __( 'Upload Your Logo here', 'kirki' ), 'section' => 'design_options', 'default' => '', 'priority' => 11, ); $fields[] = array( 'type' => 'upload', 'settings' => 'opt_header_bcg', 'label' => __( 'Header Background', 'kirki' ), 'description' => __( 'Upload Your Header Background Image', 'kirki' ), 'section' => 'design_options', 'default' => '', 'priority' => 11, 'output' => array( array( 'element' => '.site-header', 'property' => 'background-image', ), ), ); $fields[] = array( 'type' => 'upload', 'settings' => 'opt_site_bcg', 'label' => __( 'Site Background', 'kirki' ), 'description' => __( 'Upload Your Site Background Image', 'kirki' ), 'section' => 'design_options', 'default' => '', 'priority' => 11, 'output' => array( array( 'element' => '.site', 'property' => 'background-image', ), ), ); $fields[] = array( 'type' => 'text', 'settings' => 'opt_header_height', 'label' => __( 'Header height', 'kirki' ), 'description' => __( 'Set Your Header Height here (number only! e.g. 170)', 'kirki' ), 'section' => 'design_options', 'default' => '200', 'priority' => 11, 'output' => array( array( 'element' => '.centeralign-header', 'property' => 'height', 'units' => 'px', ), ), ); $fields[] = array( 'type' => 'color', 'settings' => 'opt_header_color', 'label' => __( 'Header Color', 'kirki' ), 'description' => __( 'Set Your Header Color here', 'kirki' ), 'section' => 'design_options', 'default' => '#0776A3', 'priority' => 11, 'output' => array( array( 'element' => '.site-header', 'property' => 'background-color', ), ), ); $fields[] = array( 'type' => 'color', 'settings' => 'opt_footer_color', 'label' => __( 'Footer Color', 'kirki' ), 'description' => __( 'Set Your Footer Color here', 'kirki' ), 'section' => 'design_options', 'default' => '#0776A3', 'priority' => 11, 'output' => array( array( 'element' => '.site-footer', 'property' => 'background-color', ), ), ); /* $fields[] = array( 'type' => 'color', 'settings' => 'opt_header_gradient_one', 'label' => __( 'Header Gradient Color', 'kirki' ), 'description' => __( 'This is the from* color', 'kirki' ), 'section' => 'design_options', 'default' => '#fafafa', 'priority' => 13, 'required' => array( array( 'setting' => 'opt_header_gradient_control', 'operator' => '==', 'value' => 1, ), ), ); $fields[] = array( 'type' => 'color', 'settings' => 'opt_header_gradient_two', 'description' => __( 'This is the to* color', 'kirki' ), 'section' => 'design_options', 'default' => '#cccccc', 'priority' => 13, 'required' => array( array( 'setting' => 'opt_header_gradient_control', 'operator' => '==', 'value' => 1, ), ), ); $fields[] = array( 'type' => 'checkbox', 'setting' => 'opt_header_gradient_control', 'label' => __( 'Use Gradient Header Colors', 'kirki' ), 'description' => __( 'Check the box if you would like to use Header Gradient colors', 'kirki' ), 'section' => 'design_options', 'default' => 0, 'priority' => 12, ); */ // Switch /* $fields[] = array( 'type' => 'switch', 'settings' => 'opt_menu_visibility', 'label' => __( 'Show Menu', 'kirki' ), 'description' => __( 'Chose whether if you want to show or hide your menu', 'kirki' ), 'help' => __( 'Usefull for Landing & Squezee pages', 'kirki' ), 'section' => 'design_options', 'default' => '1', 'priority' => 10, ); */ $fields[] = array( 'type' => 'radio-buttonset', 'settings' => 'opt_menu_visibility', 'label' => __( 'Show Menu', 'kirki' ), 'description' => __( 'Chose whether if you want to show or hide your menu', 'kirki' ), 'section' => 'design_options', 'default' => 'option-1', 'priority' => 10, 'choices' => array( 'option-1' => __( 'Show', 'kirki' ), 'option-2' => __( 'Hide', 'kirki' ), ), ); $fields[] = array( 'type' => 'radio-buttonset', 'settings' => 'opt_fwidget_visibility', 'label' => __( 'Show Footer Widget Area', 'kirki' ), 'description' => __( 'Chose whether if you want to show or hide Footer Widgets', 'kirki' ), 'section' => 'footer_options', 'default' => 'option-2', 'priority' => 10, 'choices' => array( 'option-1' => __( 'Show', 'kirki' ), 'option-2' => __( 'Hide', 'kirki' ), ), ); $fields[] = array( 'type' => 'radio-buttonset', 'settings' => 'opt_show_author', 'label' => __( 'Show Author Bio', 'kirki' ), 'description' => __( 'Chose whether if you want to show or hide Bio box below Post entry', 'kirki' ), 'section' => 'design_options', 'default' => '1', 'priority' => 10, 'choices' => array( '1' => __( 'Show', 'kirki' ), '2' => __( 'Hide', 'kirki' ), ), ); /* $fields[] = array( 'type' => 'radio-buttonset', 'settings' => 'opt_show_home_widget', 'label' => __( 'Show Home Page Widget', 'kirki' ), 'description' => __( 'Chose whether if you want Home Page Widget to be visible', 'kirki' ), 'section' => 'home_options', 'default' => '1', 'priority' => 10, 'choices' => array( '1' => __( 'Show', 'kirki' ), '2' => __( 'Hide', 'kirki' ), ), ); $fields[] = array( 'type' => 'radio-buttonset', 'settings' => 'opt_home_widget', 'label' => __( 'Home Page Widget', 'kirki' ), 'description' => __( 'Show Home Page Widget Content', 'kirki' ), 'section' => 'layout_options', 'default' => 'option-2', 'priority' => 10, 'choices' => array( 'option-1' => __( 'Yes', 'kirki' ), 'option-2' => __( 'No', 'kirki' ), ), ); $fields[] = array( 'type' => 'radio-buttonset', 'settings' => 'opt_home_sidebar', 'label' => __( 'Home Page Sidebar', 'kirki' ), 'description' => __( 'Show Home Page Sidebar', 'kirki' ), 'section' => 'home_options', 'default' => 'option-2', 'priority' => 10, 'choices' => array( 'option-1' => __( 'Yes', 'kirki' ), 'option-2' => __( 'No', 'kirki' ), ), ); */ return $fields; } add_filter( 'kirki/fields', 'kirki_text_controls_fields' );