selective_refresh ) ? 'postMessage' : 'refresh'; /*========================================= Slider Section Panel =========================================*/ $wp_customize->add_panel( 'artech_frontpage_sections', array( 'priority' => 32, 'title' => esc_html__( 'Frontpage Sections', 'artech' ), ) ); $wp_customize->add_section( 'slider_setting', array( 'title' => esc_html__( 'Slider Section', 'artech' ), 'panel' => 'artech_frontpage_sections', 'priority' => 1, ) ); // slider Contents $wp_customize->add_setting( 'slider_content_head' ,array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'artech_sanitize_text', 'priority' => 4, ) ); $wp_customize->add_control( 'slider_content_head', array( 'type' => 'hidden', 'label' => __('Contents','artech'), 'section' => 'slider_setting', ) ); /** * Customizer Repeater for add slides */ $wp_customize->add_setting( 'slider', array( 'sanitize_callback' => 'artech_repeater_sanitize', 'priority' => 5, 'default' => artech_get_slider_default() ) ); $wp_customize->add_control( new Artech_Repeater( $wp_customize, 'slider', array( 'label' => esc_html__('Slide','artech'), 'section' => 'slider_setting', 'add_field_label' => esc_html__( 'Add New Slider', 'artech' ), 'item_name' => esc_html__( 'Slide', 'artech' ), 'customizer_repeater_title_control' => true, 'customizer_repeater_subtitle_control' => true, 'customizer_repeater_text_control' => true, 'customizer_repeater_text2_control'=> true, 'customizer_repeater_link_control' => true, 'customizer_repeater_button2_control' => true, 'customizer_repeater_link2_control' => true, 'customizer_repeater_image_control' => true, ) ) ); //Pro feature class Artech_slider__section_upgrade extends WP_Customize_Control { public function render_content() { ?> add_setting( 'Artech_slider_upgrade_to_pro', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_filter_nohtml_kses', 'priority' => 5, )); $wp_customize->add_control( new Artech_slider__section_upgrade( $wp_customize, 'Artech_slider_upgrade_to_pro', array( 'section' => 'slider_setting', 'settings' => 'Artech_slider_upgrade_to_pro', ) ) ); } add_action( 'customize_register', 'artech_slider_setting' );