selective_refresh ) ? 'postMessage' : 'refresh'; if ( class_exists( 'bigbang_Hiding_Section' ) ) { $wp_customize->add_section( new bigbang_Hiding_Section( $wp_customize, 'bigbang_contact', array( 'title' => esc_html__( 'Contact', 'bigbang' ), 'panel' => 'bigbang_frontpage_sections', 'priority' => apply_filters( 'bigbang_section_priority', 65, 'bigbang_contact' ), 'hiding_control' => 'bigbang_contact_hide', ) ) ); } else { $wp_customize->add_section( 'bigbang_contact', array( 'title' => esc_html__( 'Contact', 'bigbang' ), 'panel' => 'bigbang_frontpage_sections', 'priority' => apply_filters( 'bigbang_section_priority', 65, 'bigbang_contact' ), ) ); } $wp_customize->add_setting( 'bigbang_contact_hide', array( 'sanitize_callback' => 'bigbang_sanitize_checkbox', 'default' => false, 'transport' => $selective_refresh, ) ); $wp_customize->add_control( 'bigbang_contact_hide', array( 'type' => 'checkbox', 'label' => esc_html__( 'Disable section', 'bigbang' ), 'section' => 'bigbang_contact', 'priority' => 1, ) ); $wp_customize->add_setting( 'bigbang_contact_background', array( 'default' => apply_filters( 'bigbang_contact_background_default', get_template_directory_uri() . '/assets/img/contact.jpg' ), 'sanitize_callback' => 'esc_url_raw', 'transport' => $selective_refresh, ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'bigbang_contact_background', array( 'label' => esc_html__( 'Background Image', 'bigbang' ), 'section' => 'bigbang_contact', 'priority' => 5, ) ) ); $wp_customize->add_setting( 'bigbang_contact_title', array( 'default' => esc_html__( 'Get in Touch', 'bigbang' ), 'sanitize_callback' => 'wp_kses_post', 'transport' => $selective_refresh, ) ); $wp_customize->add_control( 'bigbang_contact_title', array( 'label' => esc_html__( 'Section Title', 'bigbang' ), 'section' => 'bigbang_contact', 'priority' => 10, ) ); $wp_customize->add_setting( 'bigbang_contact_subtitle', array( 'default' => esc_html__( 'Change this subtitle in the Customizer', 'bigbang' ), 'sanitize_callback' => 'wp_kses_post', 'transport' => $selective_refresh, ) ); $wp_customize->add_control( 'bigbang_contact_subtitle', array( 'label' => esc_html__( 'Section Subtitle', 'bigbang' ), 'section' => 'bigbang_contact', 'priority' => 15, ) ); $wp_customize->add_setting( 'bigbang_contact_area_title', array( 'default' => esc_html__( 'Contact Us', 'bigbang' ), 'sanitize_callback' => 'sanitize_text_field', 'transport' => $selective_refresh, ) ); $wp_customize->add_control( 'bigbang_contact_area_title', array( 'label' => esc_html__( 'Form Title', 'bigbang' ), 'section' => 'bigbang_contact', 'priority' => 20, ) ); if ( class_exists( 'bigbang_Contact_Info' ) ) { $wp_customize->add_setting( 'bigbang_contact_info', array( 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new bigbang_Contact_Info( $wp_customize, 'bigbang_contact_info', array( 'label' => esc_html__( 'Instructions', 'bigbang' ), 'section' => 'bigbang_contact', 'capability' => 'install_plugins', 'priority' => 25, ) ) ); } if ( class_exists( 'bigbang_Page_Editor' ) ) { $contact_content_default = bigbang_contact_get_old_content( 'bigbang_contact_content' ); if ( empty( $contact_content_default ) ) { $contact_content_default = bigbang_contact_content_default(); } $wp_customize->add_setting( 'bigbang_contact_content_new', array( 'default' => wp_kses_post( $contact_content_default ), 'sanitize_callback' => 'wp_kses_post', 'transport' => $selective_refresh, ) ); $wp_customize->add_control( new bigbang_Page_Editor( $wp_customize, 'bigbang_contact_content_new', array( 'label' => esc_html__( 'Contact Content', 'bigbang' ), 'section' => 'bigbang_contact', 'priority' => 30, 'include_admin_print_footer' => true, ) ) ); } } add_action( 'customize_register', 'bigbang_contact_customize_register' ); /** * Add selective refresh for contact section controls. * * @param WP_Customize_Manager $wp_customize Theme Customizer object. * @since 1.1.31 * @access public */ function bigbang_register_contact_partials( $wp_customize ) { // Abort if selective refresh is not available. if ( ! isset( $wp_customize->selective_refresh ) ) { return; } $wp_customize->selective_refresh->add_partial( 'bigbang_contact_area_title', array( 'selector' => '.contactus .card-contact .card-title, .contactus .pirate-forms-placeholder .bigbang-title', 'settings' => 'bigbang_contact_area_title', 'render_callback' => 'bigbang_contact_area_title_callback', ) ); $wp_customize->selective_refresh->add_partial( 'bigbang_contact_content_new', array( 'selector' => '.contactus .col-md-5 > div.bigbang-description', 'settings' => 'bigbang_contact_content_new', 'render_callback' => 'bigbang_contact_content_new_callback', ) ); $wp_customize->selective_refresh->add_partial( 'bigbang_contact_info', array( 'selector' => '.contactus div.pirate-forms-placeholder h4.placeholder-text', 'settings' => 'bigbang_contact_info', ) ); } add_action( 'customize_register', 'bigbang_register_contact_partials' ); /** * Render callback function for contact section contact area title selective refresh * * @since 1.1.31 * @access public * @return string */ function bigbang_contact_area_title_callback() { return get_theme_mod( 'bigbang_contact_area_title' ); } /** * Render callback function for contact section content selective refresh * * @since 1.1.31 * @access public * @return string */ function bigbang_contact_content_new_callback() { return get_theme_mod( 'bigbang_contact_content_new' ); } /** * Render callback for contact image selective refresh. * * @since 1.1.30 * @access public */ function bigbang_contact_image_callback() { $bigbang_contact_background = get_theme_mod( 'bigbang_contact_background' ); if ( ! empty( $bigbang_contact_background ) ) { ?>
Bld Mihail Kogalniceanu, nr. 8,7652 Bucharest, Romania
Michael Jordan
+40 762 321 762
Mon - Fri, 8:00-22:00