get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->remove_section('colors'); /* Customizer Settings */ /* LOGO */ $wp_customize->add_section( 'annapurna_logo_section' , array( 'title' => __( 'Logo', 'annapurna' ), 'priority' => 20, )); $wp_customize->add_setting( 'annapurna_logo', array('sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'theme_logo', array( 'label' => __( 'Logo', 'annapurna' ), 'section' => 'annapurna_logo_section', 'settings' => 'annapurna_logo', 'priority' => 1, ))); /* Footer Copyright Text */ $wp_customize->add_section( 'annapurna_footer_section' , array( 'title' => __( 'Footer Copyright', 'annapurna' ), 'priority' => 28, )); $wp_customize->add_setting( 'annapurna_footer_text', array('sanitize_callback' => 'annapurna_sanitize_text','default' => __('Copyright','annapurna'))); $wp_customize->add_control( 'annapurna_footer_copyright', array( 'label' => __( 'Footer Text', 'annapurna' ), 'section' => 'annapurna_footer_section', 'settings' => 'annapurna_footer_text', 'priority' => 2, )); /* Homepage Landing Intro section */ $wp_customize->add_section( 'annapurna_landing_section' , array( 'title' => __( 'Landing Mat Section', 'annapurna' ), 'priority' => 21, )); $wp_customize->add_setting( 'annapurna_landing_background', array('sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'theme_background', array( 'label' => __( 'Background', 'annapurna' ), 'section' => 'annapurna_landing_section', 'settings' => 'annapurna_landing_background', 'priority' => 1, ))); $wp_customize->add_setting( 'annapurna_landing_heading', array('sanitize_callback' => 'annapurna_sanitize_text','default' => __('Annapurna','annapurna'))); $wp_customize->add_control( 'annapurna_landing_title', array( 'label' => __( 'Title', 'annapurna' ), 'section' => 'annapurna_landing_section', 'settings' => 'annapurna_landing_heading', 'priority' => 2, )); $wp_customize->add_setting( 'annapurna_landing_text', array('sanitize_callback' => 'annapurna_sanitize_text','default' => __('Multipurpose bootstrap template by rectic themes','annapurna'))); $wp_customize->add_control( 'annapurna_landing_paragraph', array( 'type' => 'textarea', 'label' => __( 'Text', 'annapurna' ), 'section' => 'annapurna_landing_section', 'settings' => 'annapurna_landing_text', 'priority' => 3, )); $wp_customize->add_setting( 'annapurna_landing_button', array('sanitize_callback' => 'annapurna_sanitize_text','default' => __('Click Here','annapurna'))); $wp_customize->add_control( 'annapurna_landing_buttontext', array( 'label' => __( 'Button Text', 'annapurna' ), 'section' => 'annapurna_landing_section', 'settings' => 'annapurna_landing_button', 'priority' => 4, )); $wp_customize->add_setting( 'annapurna_landing_buttonurl', array('sanitize_callback' => 'annapurna_sanitize_text','default' => __('','annapurna'))); $wp_customize->add_control( 'annapurna_landing_buttonlink', array( 'label' => __( 'Button URL', 'annapurna' ), 'section' => 'annapurna_landing_section', 'settings' => 'annapurna_landing_buttonurl', 'priority' => 5, )); $wp_customize->add_setting( 'annapurna_landing_image', array('sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'theme_landingimage', array( 'label' => __( 'Image(right)', 'annapurna' ), 'section' => 'annapurna_landing_section', 'settings' => 'annapurna_landing_image', 'priority' => 6, ))); /* Call to action button section */ $wp_customize->add_section( 'annapurna_subscribe_section' , array( 'title' => __( 'CTA Section', 'annapurna' ), 'priority' => 22, )); $wp_customize->add_setting( 'annapurna_subscribe_heading', array('sanitize_callback' => 'annapurna_sanitize_text','default' => __('Subscribe','annapurna'))); $wp_customize->add_control( 'annapurna_subscribe_title', array( 'label' => __( 'CTA Title', 'annapurna' ), 'section' => 'annapurna_subscribe_section', 'settings' => 'annapurna_subscribe_heading', 'priority' => 1, )); $wp_customize->add_setting( 'annapurna_subscribe_buttontext', array('sanitize_callback' => 'annapurna_sanitize_text','default' => __('Subscribe','annapurna'))); $wp_customize->add_control( 'annapurna_subscribe_buttonheading', array( 'label' => __( 'Button Text', 'annapurna' ), 'section' => 'annapurna_subscribe_section', 'settings' => 'annapurna_subscribe_buttontext', 'priority' => 2, )); $wp_customize->add_setting( 'annapurna_subscribe_url', array('sanitize_callback' => 'annapurna_sanitize_text','default' => __('hello','annapurna'))); $wp_customize->add_control( 'annapurna_subscribe_link', array( 'label' => __( 'Button URL', 'annapurna' ), 'section' => 'annapurna_subscribe_section', 'settings' => 'annapurna_subscribe_url', 'priority' => 3, )); /* About section */ $wp_customize->add_section( 'annapurna_about_section' , array( 'title' => __( 'About us Section', 'annapurna' ), 'priority' => 23, )); $wp_customize->add_setting( 'annapurna_about_image', array('sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'about_image', array( 'label' => __( 'Image', 'annapurna' ), 'section' => 'annapurna_about_section', 'settings' => 'annapurna_about_image', 'priority' => 1, ))); $wp_customize->add_setting( 'annapurna_about_heading', array('sanitize_callback' => 'annapurna_sanitize_text','default' => __('About us','annapurna'))); $wp_customize->add_control( 'annapurna_about_title', array( 'label' => __( 'About Title', 'annapurna' ), 'section' => 'annapurna_about_section', 'settings' => 'annapurna_about_heading', 'priority' => 2, )); $wp_customize->add_setting( 'annapurna_about_text', array('sanitize_callback' => 'annapurna_sanitize_text','default' => __('The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.','annapurna'))); $wp_customize->add_control( 'annapurna_about_body', array( 'type' => 'textarea', 'label' => __( 'About Text', 'annapurna' ), 'section' => 'annapurna_about_section', 'settings' => 'annapurna_about_text', 'priority' => 3, )); /* Services section */ if ( class_exists( 'WP_Customize_Panel' ) ): $wp_customize->add_panel( 'panel_services', array( 'priority' => 24, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Services', 'annapurna' ) ) ); /* section title */ $wp_customize->add_section( 'annapurna_service_title_section' , array( 'title' => __( 'Section Title', 'annapurna' ), 'priority' => 29, 'panel' => 'panel_services' )); $wp_customize->add_setting( 'annapurna_service_title', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_service_heading', array( 'label' => __( 'Title', 'annapurna' ), 'section' => 'annapurna_service_title_section', 'settings' => 'annapurna_service_title', 'priority' => 1, )); /* Service #1 */ $wp_customize->add_section( 'annapurna_service_one_section' , array( 'title' => __( 'Service #1', 'annapurna' ), 'priority' => 30, 'panel' => 'panel_services' )); /* Service */ $wp_customize->add_setting( 'annapurna_service_one', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_service_one_text', array( 'label' => __( 'Title', 'annapurna' ), 'section' => 'annapurna_service_one_section', 'settings' => 'annapurna_service_one', 'priority' => 1, )); /* Service Icon */ $wp_customize->add_setting( 'annapurna_service_one_icon', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_testimonial_one_pic', array( 'label' => __( 'Icon', 'annapurna' ), 'section' => 'annapurna_service_one_section', 'settings' => 'annapurna_service_one_icon', 'priority' => 2, )); /* Service #2 */ $wp_customize->add_section( 'annapurna_service_two_section' , array( 'title' => __( 'Service #2', 'annapurna' ), 'priority' => 30, 'panel' => 'panel_services' )); /* Service */ $wp_customize->add_setting( 'annapurna_service_two', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_service_two_text', array( 'label' => __( 'Title', 'annapurna' ), 'section' => 'annapurna_service_two_section', 'settings' => 'annapurna_service_two', 'priority' => 1, )); /* Service Icon */ $wp_customize->add_setting( 'annapurna_service_two_icon', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_testimonial_two_pic', array( 'label' => __( 'Icon', 'annapurna' ), 'section' => 'annapurna_service_two_section', 'settings' => 'annapurna_service_two_icon', 'priority' => 2, )); /* Service #3 */ $wp_customize->add_section( 'annapurna_service_three_section' , array( 'title' => __( 'Service #3', 'annapurna' ), 'priority' => 30, 'panel' => 'panel_services' )); /* Service */ $wp_customize->add_setting( 'annapurna_service_three', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_service_three_text', array( 'label' => __( 'Title', 'annapurna' ), 'section' => 'annapurna_service_three_section', 'settings' => 'annapurna_service_three', 'priority' => 1, )); /* Service Icon */ $wp_customize->add_setting( 'annapurna_service_three_icon', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_testimonial_three_pic', array( 'label' => __( 'Icon', 'annapurna' ), 'section' => 'annapurna_service_three_section', 'settings' => 'annapurna_service_three_icon', 'priority' => 2, )); /* Service #4 */ $wp_customize->add_section( 'annapurna_service_four_section' , array( 'title' => __( 'Service #4', 'annapurna' ), 'priority' => 30, 'panel' => 'panel_services' )); /* Service */ $wp_customize->add_setting( 'annapurna_service_four', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_service_four_text', array( 'label' => __( 'Title', 'annapurna' ), 'section' => 'annapurna_service_four_section', 'settings' => 'annapurna_service_four', 'priority' => 1, )); /* Service Icon */ $wp_customize->add_setting( 'annapurna_service_four_icon', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_testimonial_four_pic', array( 'label' => __( 'Icon', 'annapurna' ), 'section' => 'annapurna_service_four_section', 'settings' => 'annapurna_service_four_icon', 'priority' => 2, )); /* Service #5 */ $wp_customize->add_section( 'annapurna_service_five_section' , array( 'title' => __( 'Service #5', 'annapurna' ), 'priority' => 30, 'panel' => 'panel_services' )); /* Service */ $wp_customize->add_setting( 'annapurna_service_five', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_service_five_text', array( 'label' => __( 'Title', 'annapurna' ), 'section' => 'annapurna_service_five_section', 'settings' => 'annapurna_service_five', 'priority' => 1, )); /* Service Icon */ $wp_customize->add_setting( 'annapurna_service_five_icon', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_testimonial_five_pic', array( 'label' => __( 'Icon', 'annapurna' ), 'section' => 'annapurna_service_five_section', 'settings' => 'annapurna_service_five_icon', 'priority' => 2, )); /* Service #6 */ $wp_customize->add_section( 'annapurna_service_six_section' , array( 'title' => __( 'Service #6', 'annapurna' ), 'priority' => 30, 'panel' => 'panel_services' )); /* Service */ $wp_customize->add_setting( 'annapurna_service_six', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_service_six_text', array( 'label' => __( 'Title', 'annapurna' ), 'section' => 'annapurna_service_six_section', 'settings' => 'annapurna_service_six', 'priority' => 1, )); /* Service Icon */ $wp_customize->add_setting( 'annapurna_service_six_icon', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_testimonial_six_pic', array( 'label' => __( 'Icon', 'annapurna' ), 'section' => 'annapurna_service_six_section', 'settings' => 'annapurna_service_six_icon', 'priority' => 2, )); endif; /* Features Section */ if ( class_exists( 'WP_Customize_Panel' ) ): $wp_customize->add_panel( 'panel_features', array( 'priority' => 25, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Features Section', 'annapurna' ) ) ); /* feature title */ $wp_customize->add_section( 'annapurna_feature_title_section' , array( 'title' => __( 'Features Title', 'annapurna' ), 'priority' => 30, 'panel' => 'panel_features' )); $wp_customize->add_setting( 'annapurna_feature_title', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_feature_title_text', array( 'label' => __( 'Title', 'annapurna' ), 'section' => 'annapurna_feature_title_section', 'settings' => 'annapurna_feature_title', 'priority' => 1, )); /* feature paragraph */ $wp_customize->add_section( 'annapurna_feature_body_section' , array( 'title' => __( 'Features Text', 'annapurna' ), 'priority' => 30, 'panel' => 'panel_features' )); $wp_customize->add_setting( 'annapurna_feature_text', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_feature_body_text', array( 'type' => 'textarea', 'label' => __( 'Title', 'annapurna' ), 'section' => 'annapurna_feature_body_section', 'settings' => 'annapurna_feature_text', 'priority' => 1, )); /* Feature #1 */ $wp_customize->add_section( 'annapurna_feature_one_section' , array( 'title' => __( 'Features #1', 'annapurna' ), 'priority' => 30, 'panel' => 'panel_features' )); /* feature title */ $wp_customize->add_setting( 'annapurna_feature_one_title', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_feature_one_heading', array( 'label' => __( 'Title', 'annapurna' ), 'section' => 'annapurna_feature_one_section', 'settings' => 'annapurna_feature_one_title', 'priority' => 1, )); /* feature text */ $wp_customize->add_setting( 'annapurna_feature_one_text', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_feature_one_body', array( 'type' => 'textarea', 'label' => __( 'Text', 'annapurna' ), 'section' => 'annapurna_feature_one_section', 'settings' => 'annapurna_feature_one_text', 'priority' => 2, )); /* feature image */ $wp_customize->add_setting( 'annapurna_feature_one_image', array('sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'feature_one_image', array( 'label' => __( 'Image', 'annapurna' ), 'section' => 'annapurna_feature_one_section', 'settings' => 'annapurna_feature_one_image', 'priority' => 3, ))); /* Feature #2 */ $wp_customize->add_section( 'annapurna_feature_two_section' , array( 'title' => __( 'Features #2', 'annapurna' ), 'priority' => 30, 'panel' => 'panel_features' )); /* feature title */ $wp_customize->add_setting( 'annapurna_feature_two_title', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_feature_two_heading', array( 'label' => __( 'Title', 'annapurna' ), 'section' => 'annapurna_feature_two_section', 'settings' => 'annapurna_feature_two_title', 'priority' => 1, )); /* feature text */ $wp_customize->add_setting( 'annapurna_feature_two_text', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_feature_two_body', array( 'type' => 'textarea', 'label' => __( 'Text', 'annapurna' ), 'section' => 'annapurna_feature_two_section', 'settings' => 'annapurna_feature_two_text', 'priority' => 2, )); /* feature image */ $wp_customize->add_setting( 'annapurna_feature_two_image', array('sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'feature_two_image', array( 'label' => __( 'Image', 'annapurna' ), 'section' => 'annapurna_feature_two_section', 'settings' => 'annapurna_feature_two_image', 'priority' => 3, ))); /* Feature #3 */ $wp_customize->add_section( 'annapurna_feature_three_section' , array( 'title' => __( 'Features #3', 'annapurna' ), 'priority' => 30, 'panel' => 'panel_features' )); /* feature title */ $wp_customize->add_setting( 'annapurna_feature_three_title', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_feature_three_heading', array( 'label' => __( 'Title', 'annapurna' ), 'section' => 'annapurna_feature_three_section', 'settings' => 'annapurna_feature_three_title', 'priority' => 1, )); /* feature text */ $wp_customize->add_setting( 'annapurna_feature_three_text', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_feature_three_body', array( 'type' => 'textarea', 'label' => __( 'Text', 'annapurna' ), 'section' => 'annapurna_feature_three_section', 'settings' => 'annapurna_feature_three_text', 'priority' => 2, )); /* feature image */ $wp_customize->add_setting( 'annapurna_feature_three_image', array('sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'feature_three_image', array( 'label' => __( 'Image', 'annapurna' ), 'section' => 'annapurna_feature_three_section', 'settings' => 'annapurna_feature_three_image', 'priority' => 3, ))); endif; /* Video Section */ $wp_customize->add_section( 'annapurna_video_section' , array( 'title' => __( 'Video Section', 'annapurna' ), 'priority' => 26, )); $wp_customize->add_setting( 'annapurna_video_heading', array('sanitize_callback' => 'annapurna_sanitize_text','default' => __('Watch the video','annapurna'))); $wp_customize->add_control( 'annapurna_video_title', array( 'label' => __( 'Video Title', 'annapurna' ), 'section' => 'annapurna_video_section', 'settings' => 'annapurna_video_heading', 'priority' => 1, )); $wp_customize->add_setting( 'annapurna_video_link', array('sanitize_callback' => 'annapurna_sanitize_text','default' => __('','annapurna'))); $wp_customize->add_control( 'annapurna_video_url', array( 'label' => __( 'Video URL', 'annapurna' ), 'section' => 'annapurna_video_section', 'settings' => 'annapurna_video_link', 'priority' => 2, )); /* Testimonial Section */ if ( class_exists( 'WP_Customize_Panel' ) ): $wp_customize->add_panel( 'panel_testimonial', array( 'priority' => 27, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Testimonials', 'annapurna' ) ) ); /* Testimonial #1 */ $wp_customize->add_section( 'annapurna_testimonial_one_section' , array( 'title' => __( 'Testimonial #1', 'annapurna' ), 'priority' => 30, 'panel' => 'panel_testimonial' )); /* Image*/ $wp_customize->add_setting( 'annapurna_testimonial_one_image', array('sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'testimonial_one_image', array( 'label' => __( 'Image', 'annapurna' ), 'section' => 'annapurna_testimonial_one_section', 'settings' => 'annapurna_testimonial_one_image', 'priority' => 1, ))); /* Testimonial */ $wp_customize->add_setting( 'annapurna_testimonial_one', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_testimonial_one_text', array( 'type' => 'textarea', 'label' => __( 'Testimonial', 'annapurna' ), 'section' => 'annapurna_testimonial_one_section', 'settings' => 'annapurna_testimonial_one', 'priority' => 2, )); /* Testimonial author */ $wp_customize->add_setting( 'annapurna_testimonial_one_author', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_testimonial_one_by', array( 'label' => __( 'Author', 'annapurna' ), 'section' => 'annapurna_testimonial_one_section', 'settings' => 'annapurna_testimonial_one_author', 'priority' => 2, )); /* Testimonial #2 */ $wp_customize->add_section( 'annapurna_testimonial_two_section' , array( 'title' => __( 'Testimonial #2', 'annapurna' ), 'priority' => 31, 'panel' => 'panel_testimonial' )); /* Image*/ $wp_customize->add_setting( 'annapurna_testimonial_two_image', array('sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'testimonial_two_image', array( 'label' => __( 'Image', 'annapurna' ), 'section' => 'annapurna_testimonial_two_section', 'settings' => 'annapurna_testimonial_two_image', 'priority' => 1, ))); /* Testimonial */ $wp_customize->add_setting( 'annapurna_testimonial_two', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_testimonial_two_text', array( 'type' => 'textarea', 'label' => __( 'Testimonial', 'annapurna' ), 'section' => 'annapurna_testimonial_two_section', 'settings' => 'annapurna_testimonial_two', 'priority' => 2, )); /* Testimonial author */ $wp_customize->add_setting( 'annapurna_testimonial_two_author', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_testimonial_two_by', array( 'label' => __( 'Author', 'annapurna' ), 'section' => 'annapurna_testimonial_two_section', 'settings' => 'annapurna_testimonial_two_author', 'priority' => 2, )); /* Testimonial #3 */ $wp_customize->add_section( 'annapurna_testimonial_three_section' , array( 'title' => __( 'Testimonial #3', 'annapurna' ), 'priority' => 33, 'panel' => 'panel_testimonial' )); /* Image*/ $wp_customize->add_setting( 'annapurna_testimonial_three_image', array('sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'testimonial_three_image', array( 'label' => __( 'Image', 'annapurna' ), 'section' => 'annapurna_testimonial_three_section', 'settings' => 'annapurna_testimonial_three_image', 'priority' => 1, ))); /* Testimonial */ $wp_customize->add_setting( 'annapurna_testimonial_three', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_testimonial_three_text', array( 'type' => 'textarea', 'label' => __( 'Testimonial', 'annapurna' ), 'section' => 'annapurna_testimonial_three_section', 'settings' => 'annapurna_testimonial_three', 'priority' => 2, )); /* Testimonial author */ $wp_customize->add_setting( 'annapurna_testimonial_three_author', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_testimonial_three_by', array( 'label' => __( 'Author', 'annapurna' ), 'section' => 'annapurna_testimonial_three_section', 'settings' => 'annapurna_testimonial_three_author', 'priority' => 2, )); endif; /* Section Show/Hide Options */ $wp_customize->add_section( 'annapurna_section_settings' , array( 'title' => __( 'Section Settings', 'annapurna' ), 'priority' => 30, )); $wp_customize->add_setting( 'annapurna_hide_cta', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_hide_cta', array( 'type' => 'checkbox', 'label' => __( 'Hide CTA section', 'annapurna' ), 'section' => 'annapurna_section_settings', 'priority' => 1, )); $wp_customize->add_setting( 'annapurna_hide_aboutus', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_hide_aboutus', array( 'type' => 'checkbox', 'label' => __( 'Hide about us section', 'annapurna' ), 'section' => 'annapurna_section_settings', 'priority' => 2, )); $wp_customize->add_setting( 'annapurna_hide_services', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_hide_services', array( 'type' => 'checkbox', 'label' => __( 'Hide Services section', 'annapurna' ), 'section' => 'annapurna_section_settings', 'priority' => 3, )); $wp_customize->add_setting( 'annapurna_hide_features', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_hide_features', array( 'type' => 'checkbox', 'label' => __( 'Hide Features section', 'annapurna' ), 'section' => 'annapurna_section_settings', 'priority' => 4, )); $wp_customize->add_setting( 'annapurna_hide_video', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_hide_video', array( 'type' => 'checkbox', 'label' => __( 'Hide Video section', 'annapurna' ), 'section' => 'annapurna_section_settings', 'priority' => 5, )); $wp_customize->add_setting( 'annapurna_hide_testimonial', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_hide_testimonial', array( 'type' => 'checkbox', 'label' => __( 'Hide Testimonial section', 'annapurna' ), 'section' => 'annapurna_section_settings', 'priority' => 6, )); $wp_customize->add_setting( 'annapurna_hide_contactform', array('sanitize_callback' => 'annapurna_sanitize_text')); $wp_customize->add_control( 'annapurna_hide_contactform', array( 'type' => 'checkbox', 'label' => __( 'Hide Contact form', 'annapurna' ), 'section' => 'annapurna_section_settings', 'priority' => 7, )); class Annapurna_Theme_Pro extends WP_Customize_Control { public function render_content() { echo __('Click to check out the PRO Version to add custom colors, fonts and more!','annapurna'); } } /* Pricing section */ $wp_customize->add_section( 'annapurna_pro_section' , array( 'title' => __( 'Upgrade to PRO Version', 'annapurna' ), 'priority' => 130 )); $wp_customize->add_setting( 'annapurna_pro_section', array('sanitize_callback' => 'annapurna_sanitize_pro_version') ); $wp_customize->add_control( new Annapurna_Theme_Pro( $wp_customize, 'annapurna_pro_section', array( 'section' => 'annapurna_pro_section', ) )); } add_action( 'customize_register', 'annapurna_customize_register' ); function annapurna_sanitize_text( $input ) { return wp_kses_post( force_balance_tags( $input ) ); } /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function annapurna_customize_preview_js() { wp_enqueue_script( 'annapurna_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true ); } add_action( 'customize_preview_init', 'annapurna_customize_preview_js' ); function annapurna_registers() { wp_register_script( 'annapurna_jquery_ui', '//code.jquery.com/ui/1.10.4/jquery-ui.js', array("jquery"), '20120206', true ); wp_enqueue_script( 'annapurna_jquery_ui' ); wp_register_style( 'annapurna_jquery_ui_css', '//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css'); wp_enqueue_style( 'annapurna_jquery_ui_css' ); wp_register_script( 'annapurna_customizer_script', get_template_directory_uri() . '/js/annapurna_customizer.js', array("jquery","annapurna_jquery_ui"), '20120206', true ); wp_enqueue_script( 'annapurna_customizer_script' ); wp_localize_script( 'annapurna_customizer_script', 'objectL10n', array( 'documentation' => __('Documentation','annapurna'), 'pro' => __( 'Pro Version', 'annapurna' ), ) ); } add_action( 'customize_controls_enqueue_scripts', 'annapurna_registers' );