get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; /** * Top Header Quick Contact Information Options */ $wp_customize->add_section( 'sparklestore_header_quickinfo', array( 'priority' => 25, 'capability' => 'edit_theme_options', 'title' => __( 'Quick Contact Info', 'sparklestore' ) ) ); $wp_customize->add_setting('sparklestore_email_icon', array( 'default' => 'fa fa-envelope', 'sanitize_callback' => 'sparklestore_text_sanitize', // done )); $wp_customize->add_control('sparklestore_email_icon',array( 'type' => 'text', 'description' => sprintf( __( 'Use font awesome icon: Eg: %s. %sSee more here%s', 'sparklestore' ), 'fa fa-truck','','' ), 'label' => __('Enter Email Icon', 'sparklestore'), 'section' => 'sparklestore_header_quickinfo', 'setting' => 'sparklestore_email_icon', )); $wp_customize->add_setting('sparklestore_email_title', array( 'default' => 'sparklewpthemes@gmail.com', 'sanitize_callback' => 'sparklestore_text_sanitize', // done )); $wp_customize->add_control('sparklestore_email_title',array( 'type' => 'text', 'label' => __('Email Address', 'sparklestore'), 'section' => 'sparklestore_header_quickinfo', 'setting' => 'sparklestore_email_title', )); $wp_customize->add_setting('sparklestore_phone_icon', array( 'default' => 'fa fa-phone', 'sanitize_callback' => 'sparklestore_text_sanitize', // done )); $wp_customize->add_control('sparklestore_phone_icon',array( 'type' => 'text', 'description' => sprintf( __( 'Use font awesome icon: Eg: %s. %sSee more here%s', 'sparklestore' ), 'fa fa-truck','','' ), 'label' => __('Phone Icon', 'sparklestore'), 'section' => 'sparklestore_header_quickinfo', 'setting' => 'sparklestore_phone_icon', )); $wp_customize->add_setting('sparklestore_phone_number', array( 'default' => '+1 800 467 1980', 'sanitize_callback' => 'sparklestore_text_sanitize', // done )); $wp_customize->add_control('sparklestore_phone_number',array( 'type' => 'text', 'label' => __('Phone Number', 'sparklestore'), 'section' => 'sparklestore_header_quickinfo', 'setting' => 'sparklestore_phone_number', )); $wp_customize->add_setting('sparklestore_address_icon', array( 'default' => 'fa fa-map-marker', 'sanitize_callback' => 'sparklestore_text_sanitize', // done )); $wp_customize->add_control('sparklestore_address_icon',array( 'type' => 'text', 'description' => sprintf( __( 'Use font awesome icon: Eg: %s. %sSee more here%s', 'sparklestore' ), 'fa fa-truck','','' ), 'label' => __('Address Icon', 'sparklestore'), 'section' => 'sparklestore_header_quickinfo', 'setting' => 'sparklestore_address_icon', )); $wp_customize->add_setting('sparklestore_map_address', array( 'default' => '123 Main Street, Anytown, CA 78564 USA', 'sanitize_callback' => 'sparklestore_text_sanitize', // done )); $wp_customize->add_control('sparklestore_map_address',array( 'type' => 'text', 'label' => __('Address', 'sparklestore'), 'section' => 'sparklestore_header_quickinfo', 'setting' => 'sparklestore_map_address', )); $wp_customize->add_setting('sparklestore_start_open_icon', array( 'default' => 'fa fa-clock-o', 'sanitize_callback' => 'sparklestore_text_sanitize', // done )); $wp_customize->add_control('sparklestore_start_open_icon',array( 'type' => 'text', 'description' => sprintf( __( 'Use font awesome icon: Eg: %s. %sSee more here%s', 'sparklestore' ), 'fa fa-truck','','' ), 'label' => __('Start Time Icon', 'sparklestore'), 'section' => 'sparklestore_header_quickinfo', 'setting' => 'sparklestore_start_open_icon', )); $wp_customize->add_setting('sparklestore_start_open_time', array( 'default' => 'Mon - Fri : 08:00 - 17:00', 'sanitize_callback' => 'sparklestore_text_sanitize', // done )); $wp_customize->add_control('sparklestore_start_open_time',array( 'type' => 'text', 'label' => __('Opening Time', 'sparklestore'), 'section' => 'sparklestore_header_quickinfo', 'setting' => 'sparklestore_start_open_time', )); /** * General Settings Panel */ $wp_customize->add_panel('sparklestore_general_settings', array( 'capabitity' => 'edit_theme_options', 'priority' => 25, 'title' => __('General Settings', 'sparklestore') )); $wp_customize->get_section('title_tagline')->panel = 'sparklestore_general_settings'; $wp_customize->get_section('title_tagline' )->priority = 1; $wp_customize->get_section('header_image')->panel = 'sparklestore_general_settings'; $wp_customize->get_section('header_image' )->priority = 2; $wp_customize->get_section('colors')->title = __( 'Themes Colors', 'sparklestore' ); $wp_customize->get_section('colors')->panel = 'sparklestore_general_settings'; $wp_customize->get_section('header_image' )->priority = 3; $wp_customize->get_section('background_image')->panel = 'sparklestore_general_settings'; $wp_customize->get_section('header_image' )->priority = 4; /** * Web Page Layout Section */ $wp_customize->add_section( 'sparklestore_web_page_layout', array( 'title' => __('WebLayout Options', 'sparklestore'), 'panel' => 'sparklestore_general_settings' )); $wp_customize->add_setting('sparklestore_web_page_layout_options', array( 'default' => 'disable', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sparklestore_radio_enable_disable_sanitize', //'transport' => 'postMessage' )); $wp_customize->add_control('sparklestore_web_page_layout_options', array( 'type' => 'radio', 'label' => __('Enable / Disable Top Header', 'sparklestore'), 'section' => 'sparklestore_web_page_layout', 'settings' => 'sparklestore_web_page_layout_options', 'choices' => array( 'enable' => __('Boxed Layout', 'sparklestore'), 'disable' => __('Full Width Layout', 'sparklestore') ) )); /** * Services Section */ $wp_customize->add_section( 'sparklestore_services_area', array( 'title' => __('Services Area Settings', 'sparklestore'), 'priority' => '61', )); $wp_customize->add_setting('sparklestore_services_area_settings', array( 'default' => 'enable', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sparklestore_radio_enable_disable_sanitize', 'transport' => 'postMessage' )); $wp_customize->add_control('sparklestore_services_area_settings', array( 'type' => 'radio', 'label' => __('Enable/Disable Section', 'sparklestore'), 'section' => 'sparklestore_services_area', 'settings' => 'sparklestore_services_area_settings', 'choices' => array( 'enable' => __('Enable', 'sparklestore'), 'disable' => __('Disable', 'sparklestore') ) )); $wp_customize->add_setting('sparklestore_services_section', array( 'default' => 'enable', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sparklestore_radio_enable_disable_sanitize' //done )); $wp_customize->add_control('sparklestore_services_section', array( 'type' => 'radio', 'label' => __('Manage Services Area Location', 'sparklestore'), 'section' => 'sparklestore_services_area', 'settings' => 'sparklestore_services_section', 'description' => __('Options to Manage Service Area Below the Header or Abote the Footer Area', 'sparklestore'), 'choices' => array( 'enable' => __('Below the Header', 'sparklestore'), 'disable' => __('Abover the Footer', 'sparklestore') ) )); // Services Area One $wp_customize->add_setting('sparklestore_services_icon_one', array( 'default' => 'fa-truck', 'sanitize_callback' => 'sparklestore_text_sanitize', 'transport' => 'postMessage' )); $wp_customize->add_control('sparklestore_services_icon_one',array( 'type' => 'text', 'description' => sprintf( __( 'Use font awesome icon: Eg: %s. %sSee more here%s', 'sparklestore' ), 'fa fa-truck','','' ), 'label' => __('Service Icon One', 'sparklestore'), 'section' => 'sparklestore_services_area', 'setting' => 'sparklestore_services_icon_one', )); $wp_customize->add_setting('sparklestore_service_title_one', array( 'default' => 'FREE SHIPPING WORLDWIDE', 'sanitize_callback' => 'sparklestore_text_sanitize', 'transport' => 'postMessage' )); $wp_customize->add_control('sparklestore_service_title_one',array( 'type' => 'text', 'label' => __('Service One Title', 'sparklestore'), 'section' => 'sparklestore_services_area', 'setting' => 'sparklestore_service_title_one', )); $wp_customize->add_setting('sparklestore_service_desc_one', array( 'default' => 'Lorem ipsum dolor sit amet.', 'sanitize_callback' => 'esc_textarea', 'transport' => 'postMessage' )); $wp_customize->add_control('sparklestore_service_desc_one',array( 'type' => 'textarea', 'label' => __('Service Area Description', 'sparklestore'), 'section' => 'sparklestore_services_area', 'setting' => 'sparklestore_service_desc_one', )); // Services Area Two $wp_customize->add_setting('sparklestore_services_icon_two', array( 'default' => 'fa-headphones', 'sanitize_callback' => 'sparklestore_text_sanitize', 'transport' => 'postMessage' )); $wp_customize->add_control('sparklestore_services_icon_two',array( 'type' => 'text', 'description' => sprintf( __( 'Use font awesome icon: Eg: %s. %sSee more here%s', 'sparklestore' ), 'fa fa-headphones','','' ), 'label' => __('Service Icon Two', 'sparklestore'), 'section' => 'sparklestore_services_area', 'setting' => 'sparklestore_services_icon_two', )); $wp_customize->add_setting('sparklestore_service_title_two', array( 'default' => '24X7 CUSTOMER SUPPORT', 'sanitize_callback' => 'sparklestore_text_sanitize', 'transport' => 'postMessage' )); $wp_customize->add_control('sparklestore_service_title_two',array( 'type' => 'text', 'label' => __('Service Two Title', 'sparklestore'), 'section' => 'sparklestore_services_area', 'setting' => 'sparklestore_service_title_two', )); $wp_customize->add_setting('sparklestore_service_desc_two', array( 'default' => 'Lorem ipsum dolor sit amet.', 'sanitize_callback' => 'esc_textarea', 'transport' => 'postMessage' )); $wp_customize->add_control('sparklestore_service_desc_two',array( 'type' => 'textarea', 'label' => __('Service Area Description', 'sparklestore'), 'section' => 'sparklestore_services_area', 'setting' => 'sparklestore_service_desc_two', )); // Services Area Three $wp_customize->add_setting('sparklestore_services_icon_three', array( 'default' => 'fa-dollar', 'sanitize_callback' => 'sparklestore_text_sanitize', 'transport' => 'postMessage' )); $wp_customize->add_control('sparklestore_services_icon_three',array( 'type' => 'text', 'description' => sprintf( __( 'Use font awesome icon: Eg: %s. %sSee more here%s', 'sparklestore' ), 'fa fa-dollar','','' ), 'label' => __('Service Icon Three', 'sparklestore'), 'section' => 'sparklestore_services_area', 'setting' => 'sparklestore_services_icon_three', )); $wp_customize->add_setting('sparklestore_service_title_three', array( 'default' => 'MONEY BACK GUARANTEE', 'sanitize_callback' => 'sparklestore_text_sanitize', 'transport' => 'postMessage' )); $wp_customize->add_control('sparklestore_service_title_three',array( 'type' => 'text', 'label' => __('Service Three Title', 'sparklestore'), 'section' => 'sparklestore_services_area', 'setting' => 'sparklestore_service_title_three', )); $wp_customize->add_setting('sparklestore_service_desc_three', array( 'default' => 'Lorem ipsum dolor sit amet.', 'sanitize_callback' => 'esc_textarea', 'transport' => 'postMessage' )); $wp_customize->add_control('sparklestore_service_desc_three',array( 'type' => 'textarea', 'label' => __('Service Area Description', 'sparklestore'), 'section' => 'sparklestore_services_area', 'setting' => 'sparklestore_service_desc_three', )); // Services Area Four $wp_customize->add_setting('sparklestore_services_icon_four', array( 'default' => 'fa-mobile', 'sanitize_callback' => 'sparklestore_text_sanitize', 'transport' => 'postMessage' )); $wp_customize->add_control('sparklestore_services_icon_four',array( 'type' => 'text', 'description' => sprintf( __( 'Use font awesome icon: Eg: %s. %sSee more here%s', 'sparklestore' ), 'fa fa-mobile','','' ), 'label' => __('Service Icon Four', 'sparklestore'), 'section' => 'sparklestore_services_area', 'setting' => 'sparklestore_services_icon_four', )); $wp_customize->add_setting('sparklestore_service_title_four', array( 'default' => 'HOTLINE +(888) 123-4567', 'sanitize_callback' => 'sparklestore_text_sanitize', 'transport' => 'postMessage' )); $wp_customize->add_control('sparklestore_service_title_four',array( 'type' => 'text', 'label' => __('Service Four Title', 'sparklestore'), 'section' => 'sparklestore_services_area', 'setting' => 'sparklestore_service_title_four', )); $wp_customize->add_setting('sparklestore_service_desc_four', array( 'default' => 'Lorem ipsum dolor sit amet.', 'sanitize_callback' => 'esc_textarea', 'transport' => 'postMessage' )); $wp_customize->add_control('sparklestore_service_desc_four',array( 'type' => 'textarea', 'label' => __('Service Area Description', 'sparklestore'), 'section' => 'sparklestore_services_area', 'setting' => 'sparklestore_service_desc_four', )); $imagepath = get_template_directory_uri() . '/assets/images/'; class sparklestore_Image_Radio_Control extends WP_Customize_Control { public function render_content() { if ( empty( $this->choices ) ) return; $name = '_customize-radio-' . $this->id; ?> label ); ?>