'edit_theme_options', 'option_type' => 'theme_mod', ) ); $panel_priority = 9999; $section_priority = 10; $control_priority = 10; Kirki::add_panel( 'ats_global_panel', array( 'priority' => $panel_priority++, 'title' => __( 'Advanced: Global', 'textdomain' ), ) ); Kirki::add_panel( 'ats_header_panel', array( 'priority' => $panel_priority++, 'title' => __( 'Advanced: Header', 'textdomain' ), ) ); Kirki::add_panel( 'ats_footer_panel', array( 'priority' => $panel_priority++, 'title' => __( 'Advanced: Footer', 'textdomain' ), ) ); Kirki::add_panel( 'ats_miscellaneous_panel', array( 'priority' => $panel_priority++, 'title' => __( 'Advanced: Miscellaneous', 'textdomain' ), ) ); Kirki::add_section( 'ats_general_section', array( 'title' => __( 'General', 'advanced-twenty-seventeen' ), 'panel' => 'ats_global_panel', 'priority' => $section_priority++, ) ); Kirki::add_section( 'ats_layout_section', array( 'title' => __( 'Layout', 'advanced-twenty-seventeen' ), 'panel' => 'ats_global_panel', 'priority' => $section_priority++, ) ); Kirki::add_section( 'ats_header_general_section', array( 'title' => __( 'General', 'advanced-twenty-seventeen' ), 'panel' => 'ats_header_panel', 'priority' => $section_priority++, ) ); Kirki::add_section( 'ats_branding_section', array( 'title' => __( 'Site Branding', 'advanced-twenty-seventeen' ), 'panel' => 'ats_header_panel', 'priority' => $section_priority++, ) ); Kirki::add_section( 'ats_menu_section', array( 'title' => __( 'Menu', 'advanced-twenty-seventeen' ), 'panel' => 'ats_header_panel', 'priority' => $section_priority++, ) ); Kirki::add_section( 'ats_footer_copyright_section', array( 'title' => __( 'Custom Copyright', 'advanced-twenty-seventeen' ), 'panel' => 'ats_footer_panel', 'priority' => $section_priority++, ) ); Kirki::add_section( 'ats_custom_code_section', array( 'title' => __( 'Custom Code', 'advanced-twenty-seventeen' ), 'panel' => 'ats_miscellaneous_panel', 'priority' => $section_priority++, ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_site_layout', 'label' => __( 'Layout', 'translation_domain' ), 'section' => 'ats_general_section', 'type' => 'select', 'choices' => array( 'full_width' => __( 'Full Width', 'advanced-twenty-seventeen' ), 'boxed' => __( 'Boxed', 'advanced-twenty-seventeen' ), ), 'default' => 'left top', 'priority' => $control_priority++, 'transport' => 'refresh', ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_general_background_image', 'label' => __( 'Background Image', 'translation_domain' ), 'section' => 'ats_general_section', 'type' => 'image', 'priority' => $control_priority++, 'description' => __( 'To use this option properly please go to Customizer > Header Media > click on Hide Image of Header Image.', 'advanced-twenty-seventeen' ), 'output' => array( array( 'element' => 'body', 'property' => 'background-image', ), ), 'active_callback' => array( array( 'setting' => 'ats_site_layout', 'operator' => '==', 'value' => 'boxed', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_general_background_repeat', 'label' => __( 'Background Repeat', 'translation_domain' ), 'section' => 'ats_general_section', 'type' => 'select', 'choices' => $this->choice_background_repeat(), 'default' => 'no-repeat', 'priority' => $control_priority++, 'transport' => 'auto', 'output' => array( array( 'element' => 'body', 'property' => 'background-repeat', ), ), 'active_callback' => array( array( 'setting' => 'ats_site_layout', 'operator' => '==', 'value' => 'boxed', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_general_background_position', 'label' => __( 'Background Position', 'translation_domain' ), 'section' => 'ats_general_section', 'type' => 'select', 'choices' => $this->choice_background_position(), 'default' => 'left top', 'priority' => $control_priority++, 'transport' => 'auto', 'output' => array( array( 'element' => 'body', 'property' => 'background-position', ), ), 'active_callback' => array( array( 'setting' => 'ats_site_layout', 'operator' => '==', 'value' => 'boxed', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_general_background_attachment', 'label' => __( 'Background Attachment', 'translation_domain' ), 'section' => 'ats_general_section', 'type' => 'select', 'choices' => $this->choice_background_attachment(), 'default' => '', 'priority' => $control_priority++, 'transport' => 'auto', 'output' => array( array( 'element' => 'body', 'property' => 'background-attachment', ), ), 'active_callback' => array( array( 'setting' => 'ats_site_layout', 'operator' => '==', 'value' => 'boxed', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_general_background_color', 'label' => __( 'Background Color', 'translation_domain' ), 'section' => 'ats_general_section', 'type' => 'color', 'default' => '', 'priority' => $control_priority++, 'transport' => 'auto', 'output' => array( array( 'element' => 'body', 'property' => 'background-color', ), ), 'active_callback' => array( array( 'setting' => 'ats_site_layout', 'operator' => '==', 'value' => 'boxed', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_general_color', 'label' => __( 'Text Color', 'translation_domain' ), 'section' => 'ats_general_section', 'type' => 'color', 'default' => '', 'priority' => $control_priority++, 'transport' => 'auto', 'output' => array( array( 'element' => 'body', 'property' => 'color', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_general_cats_general_heading_colorolor', 'label' => __( 'Heading Color', 'translation_domain' ), 'section' => 'ats_general_section', 'type' => 'color', 'default' => '', 'priority' => $control_priority++, 'transport' => 'auto', 'output' => array( array( 'element' => 'h1, h2, h3, h4, h5, h6', 'property' => 'color', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_general_link_color', 'label' => __( 'Link Color', 'translation_domain' ), 'section' => 'ats_general_section', 'type' => 'color', 'default' => '', 'priority' => $control_priority++, 'transport' => 'auto', 'output' => array( array( 'element' => 'a', 'property' => 'color', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_general_link_color_hover', 'label' => __( 'Link Color on Hover', 'translation_domain' ), 'section' => 'ats_general_section', 'type' => 'color', 'default' => '', 'priority' => $control_priority++, 'transport' => 'auto', 'output' => array( array( 'element' => 'a:hover', 'property' => 'color', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_header_background_image', 'label' => __( 'Background Image', 'translation_domain' ), 'section' => 'ats_header_general_section', 'type' => 'image', 'priority' => $control_priority++, 'description' => __( 'To use this option properly please go to Customizer > Header Media > click on Hide Image of Header Image.', 'advanced-twenty-seventeen' ), 'output' => array( array( 'element' => '.site-header', 'property' => 'background-image', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_header_background_repeat', 'label' => __( 'Background Repeat', 'translation_domain' ), 'section' => 'ats_header_general_section', 'type' => 'select', 'choices' => $this->choice_background_repeat(), 'default' => 'no-repeat', 'priority' => $control_priority++, 'transport' => 'auto', 'output' => array( array( 'element' => '.site-header', 'property' => 'background-repeat', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_header_background_position', 'label' => __( 'Background Position', 'translation_domain' ), 'section' => 'ats_header_general_section', 'type' => 'select', 'choices' => $this->choice_background_position(), 'default' => 'left top', 'priority' => $control_priority++, 'transport' => 'auto', 'output' => array( array( 'element' => '.site-header', 'property' => 'background-position', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_header_background_attachment', 'label' => __( 'Background Attachment', 'translation_domain' ), 'section' => 'ats_header_general_section', 'type' => 'select', 'choices' => $this->choice_background_attachment(), 'default' => '', 'priority' => $control_priority++, 'transport' => 'auto', 'output' => array( array( 'element' => '.site-header', 'property' => 'background-attachment', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_header_background_color', 'label' => __( 'Background Color', 'translation_domain' ), 'section' => 'ats_header_general_section', 'type' => 'color', 'default' => '', 'priority' => $control_priority++, 'transport' => 'auto', 'output' => array( array( 'element' => '.site-header', 'property' => 'background-color', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_branding_align', 'label' => __( 'Align', 'translation_domain' ), 'section' => 'ats_branding_section', 'type' => 'select', 'choices' => array( 'left' => __( 'Left', 'advanced-twenty-seventeen' ), 'center' => __( 'Center', 'advanced-twenty-seventeen' ), 'right' => __( 'Right', 'advanced-twenty-seventeen' ), ), 'description' => __( 'Horizontal align for site branding', 'advanced-twenty-seventeen' ), 'default' => 'left', 'priority' => $control_priority++, 'transport' => 'refresh', ) ); Kirki::add_field( 'ats', array( 'type' => 'typography', 'settings' => 'ats_header_site_title_typography', 'label' => esc_attr__( 'Site Title', 'kirki' ), 'section' => 'ats_branding_section', 'default' => array( 'font-family' => 'Libre Franklin', 'variant' => '800', 'font-size' => '36px', 'letter-spacing' => '0.08em', 'subsets' => array( 'latin-ext' ), 'color' => '#fff', 'text-transform' => 'uppercase', ), 'priority' => $control_priority++, 'output' => array( array( 'element' => '.site-branding .site-branding-text .site-title, .site-branding .site-branding-text .site-title, .site-branding .site-branding-text .site-title, .site-branding .site-branding-text .site-title a', ), ), ) ); Kirki::add_field( 'ats', array( 'type' => 'typography', 'settings' => 'ats_header_site_description', 'label' => esc_attr__( 'Site Description', 'kirki' ), 'section' => 'ats_branding_section', 'default' => array( 'font-family' => 'Libre Franklin', 'variant' => '400', 'font-size' => '16px', 'letter-spacing' => '0em', 'subsets' => array( 'latin-ext' ), 'color' => '#fff', 'text-transform' => 'none', ), 'priority' => $control_priority++, 'output' => array( array( 'element' => '.site-branding .site-branding-text .site-description', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_menu_align', 'label' => __( 'Align', 'translation_domain' ), 'section' => 'ats_menu_section', 'type' => 'select', 'choices' => array( 'left' => __( 'Left', 'advanced-twenty-seventeen' ), 'center' => __( 'Center', 'advanced-twenty-seventeen' ), 'right' => __( 'Right', 'advanced-twenty-seventeen' ), ), 'description' => __( 'Horizontal align for menu', 'advanced-twenty-seventeen' ), 'default' => 'left', 'priority' => $control_priority++, 'transport' => 'auto', 'output' => array( array( 'element' => '.navigation-top .menu', 'property' => 'text-align' ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_menu_background_image', 'label' => __( 'Background Image', 'translation_domain' ), 'section' => 'ats_menu_section', 'type' => 'image', 'priority' => $control_priority++, 'output' => array( array( 'element' => '.navigation-top', 'property' => 'background-image', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_menu_background_repeat', 'label' => __( 'Background Repeat', 'translation_domain' ), 'section' => 'ats_menu_section', 'type' => 'select', 'choices' => $this->choice_background_repeat(), 'default' => 'no-repeat', 'priority' => $control_priority++, 'transport' => 'auto', 'output' => array( array( 'element' => '.navigation-top', 'property' => 'background-repeat', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_menu_background_position', 'label' => __( 'Background Position', 'translation_domain' ), 'section' => 'ats_menu_section', 'type' => 'select', 'choices' => $this->choice_background_position(), 'default' => 'left top', 'priority' => $control_priority++, 'transport' => 'auto', 'output' => array( array( 'element' => '.navigation-top', 'property' => 'background-position', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_menu_background_attachment', 'label' => __( 'Background Attachment', 'translation_domain' ), 'section' => 'ats_menu_section', 'type' => 'select', 'choices' => $this->choice_background_attachment(), 'default' => '', 'priority' => $control_priority++, 'transport' => 'auto', 'output' => array( array( 'element' => '.navigation-top', 'property' => 'background-attachment', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_menu_background_color', 'label' => __( 'Background Color', 'translation_domain' ), 'section' => 'ats_menu_section', 'type' => 'color', 'default' => '', 'priority' => $control_priority++, 'transport' => 'auto', 'output' => array( array( 'element' => '.navigation-top', 'property' => 'background-color', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_menu_border_top', 'label' => __( 'Border Top', 'translation_domain' ), 'section' => 'ats_menu_section', 'type' => 'textfield', 'default' => '1px solid #eee', 'priority' => $control_priority++, 'transport' => 'auto', 'description' => __( 'For example: 1px solid #eee or none', 'advanced-twenty-seventeen' ), 'output' => array( array( 'element' => '.navigation-top', 'property' => 'border-top', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_menu_border_bottom', 'label' => __( 'Border Bottom', 'translation_domain' ), 'section' => 'ats_menu_section', 'type' => 'textfield', 'default' => '1px solid #eee', 'priority' => $control_priority++, 'transport' => 'auto', 'description' => __( 'For example: 1px solid #eee or none', 'advanced-twenty-seventeen' ), 'output' => array( array( 'element' => '.navigation-top', 'property' => 'border-bottom', ), ), ) ); Kirki::add_field( 'ats', array( 'type' => 'typography', 'settings' => 'ats_menu_item', 'label' => esc_attr__( 'Menu Item', 'kirki' ), 'section' => 'ats_menu_section', 'default' => array( 'font-family' => 'Libre Franklin', 'variant' => '600', 'font-size' => '0.875rem', 'letter-spacing' => '0em', 'subsets' => array( 'latin-ext' ), 'color' => '#222', 'text-transform' => 'none', ), 'transport' => 'auto', 'priority' => $control_priority++, 'output' => array( array( 'element' => '.navigation-top .menu > .menu-item > a', ), ), ) ); Kirki::add_field( 'ats', array( 'type' => 'typography', 'settings' => 'ats_menu_item_hover', 'label' => esc_attr__( 'Menu Item', 'kirki' ), 'section' => 'ats_menu_section', 'default' => array( 'font-family' => 'Libre Franklin', 'variant' => '600', 'font-size' => '0.875rem', 'letter-spacing' => '0em', 'subsets' => array( 'latin-ext' ), 'color' => '#767676', 'text-transform' => 'none', ), 'transport' => 'refresh', 'priority' => $control_priority++, 'output' => array( array( 'element' => '.main-navigation .menu > .menu-item > a:hover, .navigation-top .current-menu-item > a, .navigation-top .current_page_item > a', ), ), ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_custom_copyright', 'label' => __( 'Custom Copyright', 'translation_domain' ), 'section' => 'ats_footer_copyright_section', 'type' => 'textarea', 'default' => __( 'Proudly powered by WordPress', 'advanced-twenty-seventeen' ), 'priority' => $control_priority++, 'transport' => 'refresh', ) ); Kirki::add_field( 'ats', array( 'settings' => 'ats_custom_code', 'label' => __( 'Custom Code', 'translation_domain' ), 'section' => 'ats_custom_code_section', 'type' => 'code', 'default' => __( '', 'advanced-twenty-seventeen' ), 'priority' => $control_priority++, 'transport' => 'refresh', 'choices' => array( 'language' => '', 'theme' => 'monokai', 'height' => 250, ), ) ); add_action( 'wp_footer', array( $this, 'wp_footer' ) ); add_filter( 'body_class', array( $this, 'body_class' ) ); } public function wp_footer() { if ( $custom_code = get_theme_mod( 'ats_custom_code' ) ) { echo $custom_code; } } public function body_class( $classes ) { $classes[] = 'ats-layout-' . Kirki::get_option( 'ats', 'ats_site_layout' ); if ( is_customize_preview ) { $classes[] = 'ats-preview'; } return $classes; } protected function choice_background_repeat() { return array( 'repeat' => __( 'Repeat', 'advanced-twenty-seventeen' ), 'repeat-x' => __( 'Repeat Horizontal', 'advanced-twenty-seventeen' ), 'repeat-y' => __( 'Repeat Vertical', 'advanced-twenty-seventeen' ), 'no-repeat' => __( 'No Repeat', 'advanced-twenty-seventeen' ), ); } protected function choice_background_position() { return array( 'left top' => __( 'Left Top', 'advanced-twenty-seventeen' ), 'left center' => __( 'Left Center', 'advanced-twenty-seventeen' ), 'left bottom' => __( 'Left Bottom', 'advanced-twenty-seventeen' ), 'right top' => __( 'Right Top', 'advanced-twenty-seventeen' ), 'right center' => __( 'Right Center', 'advanced-twenty-seventeen' ), 'right bottom' => __( 'Right Bottom', 'advanced-twenty-seventeen' ), 'center top' => __( 'Center Top', 'advanced-twenty-seventeen' ), 'center center' => __( 'Center Center', 'advanced-twenty-seventeen' ), 'center bottom' => __( 'Center Bottom', 'advanced-twenty-seventeen' ), ); } protected function choice_background_attachment() { return array( 'scroll' => __( 'Scroll', 'advanced-twenty-seventeen' ), 'fixed' => __( 'Fixed', 'advanced-twenty-seventeen' ), 'inherit' => __( 'Inherit', 'advanced-twenty-seventeen' ), ); } protected function choice_text_transform() { return array( 'none' => __( 'None', 'advanced-twenty-seventeen' ), 'capitalize' => __( 'Capitalize', 'advanced-twenty-seventeen' ), 'uppercase' => __( 'Uppercase', 'advanced-twenty-seventeen' ), 'lowercase' => __( 'Lowercase', 'advanced-twenty-seventeen' ), 'inherit' => __( 'Inherit', 'advanced-twenty-seventeen' ), ); } } return new ATS_Customizer();