<?php /** * Contact Section options * * @package Theme Palace * @subpackage Businesszen * @since Businesszen 1.0.0 */ // Add Contact section $wp_customize->add_section( 'businesszen_contact_section', array( 'title' => esc_html__( 'Contact us','businesszen' ), 'description' => esc_html__( 'Contact us Section options.', 'businesszen' ), 'panel' => 'businesszen_front_page_panel', ) ); // Contact content enable control and setting $wp_customize->add_setting( 'businesszen_theme_options[contact_section_enable]', array( 'default' => $options['contact_section_enable'], 'sanitize_callback' => 'businesszen_sanitize_switch_control', ) ); $wp_customize->add_control( new businesszen_Switch_Control( $wp_customize, 'businesszen_theme_options[contact_section_enable]', array( 'label' => esc_html__( 'Contact Section Enable', 'businesszen' ), 'section' => 'businesszen_contact_section', 'on_off_label' => businesszen_switch_options(), ) ) ); // contact section title control and setting $wp_customize->add_setting( 'businesszen_theme_options[contact_section_subtitle]', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => $options['contact_section_subtitle'], 'transport' =>'postMessage' ) ); $wp_customize->add_control('businesszen_theme_options[contact_section_subtitle]', array( 'label' => esc_html__( 'Section Sub Title', 'businesszen' ), 'section' => 'businesszen_contact_section', 'type' => 'text', 'active_callback' => 'businesszen_is_contact_section_enable', ) ); $wp_customize->selective_refresh->add_partial( 'businesszen_theme_options[contact_section_subtitle]', array( 'selector' => '#businesszen_contact_section .section-subtitle', 'render_callback' => 'businesszen_contact_section_subtitle_partial', ) ); // contact section title control and setting $wp_customize->add_setting( 'businesszen_theme_options[contact_section_title]', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => $options['contact_section_title'], 'transport' =>'postMessage' ) ); $wp_customize->add_control('businesszen_theme_options[contact_section_title]', array( 'label' => esc_html__( 'Section Title', 'businesszen' ), 'section' => 'businesszen_contact_section', 'type' => 'text', 'active_callback' => 'businesszen_is_contact_section_enable', ) ); $wp_customize->selective_refresh->add_partial( 'businesszen_theme_options[contact_section_title]', array( 'selector' => '#businesszen_contact_section .section-title', 'render_callback' => 'businesszen_contact_section_title_partial', ) ); // contact section title control and setting $wp_customize->add_setting( 'businesszen_theme_options[contact_section_shortcode]', array( 'sanitize_callback' => 'sanitize_text_field', 'transport' =>'refresh' ) ); $wp_customize->add_control('businesszen_theme_options[contact_section_shortcode]', array( 'label' => esc_html__( 'Contact Form Shortcode', 'businesszen' ), 'description' => sprintf( businesszen_santize_allow_tag('<a href="%1$s" target="_blank">click here </a> to get contact form 7 shortcode.', 'businesszen'), admin_url( $paths = '?page=wpcf7', $scheme = 'admin' ) ), 'section' => 'businesszen_contact_section', 'type' => 'text', 'active_callback' => 'businesszen_is_contact_section_enable', ) ); //contact_section_address $wp_customize->add_setting('businesszen_theme_options[contact_section_address]', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => $options['contact_section_address'], ) ); $wp_customize->add_control('businesszen_theme_options[contact_section_address]', array( 'section' => 'businesszen_contact_section', 'label' => esc_html__( 'Address:', 'businesszen' ), 'type' =>'text', 'active_callback' => 'businesszen_is_contact_section_enable' ) ); //contact_section_phone_number $wp_customize->add_setting('businesszen_theme_options[contact_section_phone_number]', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => $options['contact_section_phone_number'], ) ); $wp_customize->add_control('businesszen_theme_options[contact_section_phone_number]', array( 'section' => 'businesszen_contact_section', 'label' => esc_html__( 'Contact Number:', 'businesszen' ), 'type' =>'text', 'active_callback' => 'businesszen_is_contact_section_enable' ) ); //contact_section_email $wp_customize->add_setting('businesszen_theme_options[contact_section_email]', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => $options['contact_section_email'], ) ); $wp_customize->add_control('businesszen_theme_options[contact_section_email]', array( 'section' => 'businesszen_contact_section', 'label' => esc_html__( 'E-mail:', 'businesszen' ), 'type' =>'text', 'active_callback' => 'businesszen_is_contact_section_enable' ) );