get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; // Add theme options section. $wp_customize->add_section( 'bayn-lite', array( 'title' => esc_html__( 'Theme Options', 'bayn-lite' ), ) ); // Intro section. $wp_customize->add_setting( 'front_page_intro_page', array( 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'front_page_intro_page', array( 'label' => esc_html__( 'Intro Page', 'bayn-lite' ), 'section' => 'bayn-lite', 'type' => 'dropdown-pages', 'active_callback' => 'is_front_page', 'description' => wp_kses_post( __( 'The content of this page will be displayed below the slider on your static front page.', 'bayn-lite' ) ), ) ); // Change hero slider speed. $wp_customize->add_setting( 'slider_speed', array( 'sanitize_callback' => 'absint', 'default' => 500, ) ); $wp_customize->add_control( 'slider_speed', array( 'label' => esc_html__( 'Top slider speed', 'bayn-lite' ), 'section' => 'bayn-lite', 'type' => 'number', 'active_callback' => 'is_front_page', 'description' => esc_html__( 'Change the top slider speed. Use 0 to disable.', 'bayn-lite' ), ) ); // Services pages. $wp_customize->add_setting( 'front_page_service_page_1', array( 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'front_page_service_page_1', array( 'label' => esc_html__( 'Service Page 1', 'bayn-lite' ), 'section' => 'bayn-lite', 'type' => 'dropdown-pages', 'active_callback' => 'is_front_page', ) ); $wp_customize->add_setting( 'front_page_service_page_2', array( 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'front_page_service_page_2', array( 'label' => esc_html__( 'Service Page 2', 'bayn-lite' ), 'section' => 'bayn-lite', 'type' => 'dropdown-pages', 'active_callback' => 'is_front_page', ) ); $wp_customize->add_setting( 'front_page_service_page_3', array( 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'front_page_service_page_3', array( 'label' => esc_html__( 'Service Page 3', 'bayn-lite' ), 'section' => 'bayn-lite', 'type' => 'dropdown-pages', 'active_callback' => 'is_front_page', ) ); $wp_customize->add_setting( 'front_page_service_page_4', array( 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'front_page_service_page_4', array( 'label' => esc_html__( 'Service Page 4', 'bayn-lite' ), 'section' => 'bayn-lite', 'type' => 'dropdown-pages', 'active_callback' => 'is_front_page', ) ); // Portfolio section. $wp_customize->add_setting( 'front_page_portfolio_title', array( 'default' => esc_html__( 'Recent Work', 'bayn-lite' ), 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'front_page_portfolio_title', array( 'label' => esc_html__( 'Portfolio Section Title', 'bayn-lite' ), 'section' => 'bayn-lite', 'type' => 'text', 'active_callback' => 'is_front_page', ) ); $wp_customize->add_setting( 'front_page_portfolio_subtitle', array( 'default' => esc_html__( 'Design and Engineering', 'bayn-lite' ), 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'front_page_portfolio_subtitle', array( 'label' => esc_html__( 'Portfolio Section Subtitle', 'bayn-lite' ), 'section' => 'bayn-lite', 'type' => 'text', 'active_callback' => 'is_front_page', ) ); $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; // Contact section. $wp_customize->add_setting( 'front_page_contact_title', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'front_page_contact_title', array( 'label' => esc_html__( 'Contact Section Title', 'bayn-lite' ), 'section' => 'bayn-lite', 'type' => 'text', 'active_callback' => 'is_front_page', ) ); $wp_customize->add_setting( 'front_page_contact_info', array( 'default' => '', 'sanitize_callback' => 'wp_kses_post', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'front_page_contact_info', array( 'label' => '', 'section' => 'bayn-lite', 'type' => 'textarea', 'active_callback' => 'is_front_page', ) ); $wp_customize->add_setting( 'front_page_contact_page', array( 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'front_page_contact_page', array( 'label' => esc_html__( 'Contact Page', 'bayn-lite' ), 'section' => 'bayn-lite', 'type' => 'dropdown-pages', 'active_callback' => 'is_front_page', ) ); $front_page_cta_text_default = '