default ); } function animate_lite_sanitize_checkbox( $checked ) { // Boolean check. return ( ( isset( $checked ) && true == $checked ) ? true : false ); } $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; //Panel for section & control $wp_customize->add_panel( 'animate_lite_theme_options_panel', array( 'priority' => null, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Theme Options Panel', 'animate-lite' ), ) ); //Layout Options $wp_customize->add_section('animate_lite_layout_option',array( 'title' => __('Site Layout Options','animate-lite'), 'priority' => 1, 'panel' => 'animate_lite_theme_options_panel', )); $wp_customize->add_setting('animate_lite_boxlayout',array( 'sanitize_callback' => 'animate_lite_sanitize_checkbox', )); $wp_customize->add_control( 'animate_lite_boxlayout', array( 'section' => 'animate_lite_layout_option', 'label' => __('Check to Box Layout','animate-lite'), 'description' => __('If you want to box layout please check the for Box Layout Options','animate-lite'), 'type' => 'checkbox' )); //Layout Options $wp_customize->add_setting('animate_lite_site_color_options',array( 'default' => '#33acf2', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'animate_lite_site_color_options',array( 'label' => __('Color Options','animate-lite'), 'description' => __('More color options in PRO Version','animate-lite'), 'section' => 'colors', 'settings' => 'animate_lite_site_color_options' )) ); $wp_customize->add_setting('animate_lite_secondcolor_options',array( 'default' => '#f0396e', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'animate_lite_secondcolor_options',array( 'label' => __('Second Color Options','animate-lite'), 'section' => 'colors', 'settings' => 'animate_lite_secondcolor_options' )) ); //Site Fixed Header Options $wp_customize->add_section('animate_lite_fixed_header_options',array( 'title' => __('Sticky Header','animate-lite'), 'priority' => null, 'panel' => 'animate_lite_theme_options_panel', )); $wp_customize->add_setting('animate_lite_stickyheader',array( 'default' => null, 'sanitize_callback' => 'animate_lite_sanitize_checkbox', )); $wp_customize->add_control( 'animate_lite_stickyheader', array( 'section' => 'animate_lite_fixed_header_options', 'label' => __('Check to show fixed header on scroll','animate-lite'), 'type' => 'checkbox' )); //end Fixed header Options //Header Social icons $wp_customize->add_section('animate_lite_hdr_social_area',array( 'title' => __('Header social icons','animate-lite'), 'description' => __( 'Add social icons link here to display icons in header.', 'animate-lite' ), 'priority' => null, 'panel' => 'animate_lite_theme_options_panel', )); $wp_customize->add_setting('animate_lite_hdrfb_link',array( 'default' => null, 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('animate_lite_hdrfb_link',array( 'label' => __('Add facebook link here','animate-lite'), 'section' => 'animate_lite_hdr_social_area', 'setting' => 'animate_lite_hdrfb_link' )); $wp_customize->add_setting('animate_lite_hdrtwitt_link',array( 'default' => null, 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('animate_lite_hdrtwitt_link',array( 'label' => __('Add twitter link here','animate-lite'), 'section' => 'animate_lite_hdr_social_area', 'setting' => 'animate_lite_hdrtwitt_link' )); $wp_customize->add_setting('animate_lite_hdrgplus_link',array( 'default' => null, 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('animate_lite_hdrgplus_link',array( 'label' => __('Add google plus link here','animate-lite'), 'section' => 'animate_lite_hdr_social_area', 'setting' => 'animate_lite_hdrgplus_link' )); $wp_customize->add_setting('animate_lite_hdrlinked_link',array( 'default' => null, 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('animate_lite_hdrlinked_link',array( 'label' => __('Add linkedin link here','animate-lite'), 'section' => 'animate_lite_hdr_social_area', 'setting' => 'animate_lite_hdrlinked_link' )); $wp_customize->add_setting('animate_lite_show_hdr_social_area',array( 'default' => false, 'sanitize_callback' => 'animate_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'animate_lite_show_hdr_social_area', array( 'settings' => 'animate_lite_show_hdr_social_area', 'section' => 'animate_lite_hdr_social_area', 'label' => __('Check To show This Section','animate-lite'), 'type' => 'checkbox' ));//Show Header Social icons area //Book Appointment Button $wp_customize->add_section('animate_lite_book_an_appointment_section',array( 'title' => __('Book Appointment Button','animate-lite'), 'description' => __( 'Add button text and link to show book appointment button', 'animate-lite' ), 'priority' => null, 'panel' => 'animate_lite_theme_options_panel', )); $wp_customize->add_setting('animate_lite_book_appointment_btntext',array( 'default' => null, 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('animate_lite_book_appointment_btntext',array( 'type' => 'text', 'label' => __('Add book appointment button text here','animate-lite'), 'section' => 'animate_lite_book_an_appointment_section', 'setting' => 'animate_lite_book_appointment_btntext' )); // Book appointment Button Text $wp_customize->add_setting('animate_lite_appointment_button_link',array( 'default' => null, 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('animate_lite_appointment_button_link',array( 'label' => __('Add link for book appointment button','animate-lite'), 'section' => 'animate_lite_book_an_appointment_section', 'setting' => 'animate_lite_appointment_button_link' )); $wp_customize->add_setting('animate_lite_show_book_appointment_button',array( 'default' => false, 'sanitize_callback' => 'animate_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'animate_lite_show_book_appointment_button', array( 'settings' => 'animate_lite_show_book_appointment_button', 'section' => 'animate_lite_book_an_appointment_section', 'label' => __('Check To show appointment button','animate-lite'), 'type' => 'checkbox' ));//Show Appointment button // Header Slider Section $wp_customize->add_section( 'animate_lite_homeslider_sections', array( 'title' => __('Slider Section', 'animate-lite'), 'priority' => null, 'description' => __('Default image size for slider is 1400 x 720 pixel.','animate-lite'), 'panel' => 'animate_lite_theme_options_panel', )); $wp_customize->add_setting('animate_lite_pageforslider1',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'animate_lite_sanitize_dropdown_pages' )); $wp_customize->add_control('animate_lite_pageforslider1',array( 'type' => 'dropdown-pages', 'label' => __('Select page for slider first:','animate-lite'), 'section' => 'animate_lite_homeslider_sections' )); $wp_customize->add_setting('animate_lite_pageforslider2',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'animate_lite_sanitize_dropdown_pages' )); $wp_customize->add_control('animate_lite_pageforslider2',array( 'type' => 'dropdown-pages', 'label' => __('Select page for slider second:','animate-lite'), 'section' => 'animate_lite_homeslider_sections' )); $wp_customize->add_setting('animate_lite_pageforslider3',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'animate_lite_sanitize_dropdown_pages' )); $wp_customize->add_control('animate_lite_pageforslider3',array( 'type' => 'dropdown-pages', 'label' => __('Select page for slider third:','animate-lite'), 'section' => 'animate_lite_homeslider_sections' )); // Slider Section Options $wp_customize->add_setting('animate_lite_buttontextforslider',array( 'default' => null, 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('animate_lite_buttontextforslider',array( 'type' => 'text', 'label' => __('Add slider Read more button name here','animate-lite'), 'section' => 'animate_lite_homeslider_sections', 'setting' => 'animate_lite_buttontextforslider' )); // Slider Read More Button Text $wp_customize->add_setting('animate_lite_show_slidersection',array( 'default' => false, 'sanitize_callback' => 'animate_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'animate_lite_show_slidersection', array( 'settings' => 'animate_lite_show_slidersection', 'section' => 'animate_lite_homeslider_sections', 'label' => __('Check To Show This Section','animate-lite'), 'type' => 'checkbox' ));//Show Home Slider Section // Services Section $wp_customize->add_section('animate_lite_2colservices_sections', array( 'title' => __('Four Column Services','animate-lite'), 'description' => __('Select pages from the dropdown for services section','animate-lite'), 'priority' => null, 'panel' => 'animate_lite_theme_options_panel', )); $wp_customize->add_setting('animate_lite_servicespage_box1',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'animate_lite_sanitize_dropdown_pages' )); $wp_customize->add_control( 'animate_lite_servicespage_box1',array( 'type' => 'dropdown-pages', 'section' => 'animate_lite_2colservices_sections', )); $wp_customize->add_setting('animate_lite_servicespage_box2',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'animate_lite_sanitize_dropdown_pages' )); $wp_customize->add_control( 'animate_lite_servicespage_box2',array( 'type' => 'dropdown-pages', 'section' => 'animate_lite_2colservices_sections', )); $wp_customize->add_setting('animate_lite_servicespage_box3',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'animate_lite_sanitize_dropdown_pages' )); $wp_customize->add_control( 'animate_lite_servicespage_box3',array( 'type' => 'dropdown-pages', 'section' => 'animate_lite_2colservices_sections', )); $wp_customize->add_setting('animate_lite_servicespage_box4',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'animate_lite_sanitize_dropdown_pages' )); $wp_customize->add_control( 'animate_lite_servicespage_box4',array( 'type' => 'dropdown-pages', 'section' => 'animate_lite_2colservices_sections', )); $wp_customize->add_setting('animate_lite_show_2column_servicessections',array( 'default' => false, 'sanitize_callback' => 'animate_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'animate_lite_show_2column_servicessections', array( 'settings' => 'animate_lite_show_2column_servicessections', 'section' => 'animate_lite_2colservices_sections', 'label' => __('Check To Show This Section','animate-lite'), 'type' => 'checkbox' ));//Show three column Services Sections // Welcome Page Section $wp_customize->add_section('animate_lite_welcomepage_sections', array( 'title' => __('Welcome Section','animate-lite'), 'description' => __('Select Pages from the dropdown for welcome section','animate-lite'), 'priority' => null, 'panel' => 'animate_lite_theme_options_panel', )); $wp_customize->add_setting('animate_lite_welcomepagepart',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'animate_lite_sanitize_dropdown_pages' )); $wp_customize->add_control( 'animate_lite_welcomepagepart',array( 'type' => 'dropdown-pages', 'section' => 'animate_lite_welcomepage_sections', )); $wp_customize->add_setting('animate_lite_show_welcomepagepart',array( 'default' => false, 'sanitize_callback' => 'animate_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'animate_lite_show_welcomepagepart', array( 'settings' => 'animate_lite_show_welcomepagepart', 'section' => 'animate_lite_welcomepage_sections', 'label' => __('Check To Show This Section','animate-lite'), 'type' => 'checkbox' ));//Show Welcome Section } add_action( 'customize_register', 'animate_lite_customize_register' ); function animate_lite_custom_css(){ ?>