add_section(new Businessroy_Toggle_Section($wp_customize, 'businessroy_highlight_section', array( 'title' => esc_html__('Highlight Section', 'business-roy'), 'panel' => 'businessroy_frontpage_settings', 'priority' => businessroy_themes_get_section_position('businessroy_highlight_section'), 'hiding_control' => 'businessroy_highlight_disable' ))); //ENABLE/DISABLE HIGHLIGHT SECTION $wp_customize->add_setting('businessroy_highlight_disable', array( 'default' => 'enable', 'transport' => 'postMessage', 'sanitize_callback' => 'businessroy_themes_sanitize_switch', )); $wp_customize->add_control(new Businessroy_Switch_Control($wp_customize, 'businessroy_highlight_disable', array( 'label' => esc_html__('Section', 'business-roy'), 'section' => 'businessroy_highlight_section', 'switch_label' => array( 'enable' => esc_html__('Enable', 'business-roy'), 'disable' => esc_html__('Disable', 'business-roy'), ), 'class' => 'switch-section', 'priority' => -1, ))); $wp_customize->add_setting('businessroy_highlight_nav', array( 'transport' => 'postMessage', 'sanitize_callback' => 'wp_kses_post', )); $wp_customize->add_control(new Businessroy_Custom_Control_Tab($wp_customize, 'businessroy_highlight_nav', array( 'type' => 'tab', 'section' => 'businessroy_highlight_section', 'priority' => 1, 'buttons' => array( array( 'name' => esc_html__('Content', 'business-roy'), 'fields' => array( 'businessroy_highlight_super_title', 'businessroy_highlight_title', 'businessroy_highlight_title_align', 'businessroy_highlight_title_style', 'businessroy_highlight_advance_settings', 'businessroy_highlight_style', ), 'active' => true, ), array( 'name' => esc_html__('Style', 'business-roy'), 'fields' => array( ), ), array( 'name' => esc_html__('Advanced', 'business-roy'), 'fields' => array( 'businessroy_highlight_bg_type', 'businessroy_highlight_bg_color', 'businessroy_highlight_bg_image', 'businessroy_highlight_overlay_color', 'businessroy_highlight_padding', 'businessroy_highlight_cs_seperator', ), ), ), ))); $wp_customize->add_setting('businessroy_highlight_super_title', array( 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage', )); $wp_customize->add_control('businessroy_highlight_super_title', array( 'section' => 'businessroy_highlight_section', 'type' => 'text', 'label' => esc_html__('Super Title', 'business-roy') )); $wp_customize->add_setting('businessroy_highlight_title', array( 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'postMessage' )); $wp_customize->add_control('businessroy_highlight_title', array( 'section' => 'businessroy_highlight_section', 'type' => 'text', 'label' => esc_html__('Title', 'business-roy') )); $wp_customize->add_setting('businessroy_highlight_title_align', array( 'default' => 'text-center', 'sanitize_callback' => 'businessroy_themes_sanitize_select', 'transport' => 'postMessage' )); $wp_customize->add_control(new Businessroy_Custom_Control_Buttonset($wp_customize,'businessroy_highlight_title_align', array( 'choices' => array( 'text-left' => esc_html__('Left', 'business-roy'), 'text-right' => esc_html__('Right', 'business-roy'), 'text-center' => esc_html__('Center', 'business-roy'), ), 'label' => esc_html__( 'Alignment', 'business-roy' ), 'section' => 'businessroy_highlight_section', 'settings' => 'businessroy_highlight_title_align', )) ); $wp_customize->add_setting('businessroy_highlight_title_style', array( 'default' => 'style1', 'transport' => 'postMessage', 'sanitize_callback' => 'businessroy_themes_sanitize_select' )); $wp_customize->add_control('businessroy_highlight_title_style', array( 'section' => 'businessroy_highlight_section', 'type' => 'select', 'label' => esc_html__( 'Section Title Style', 'business-roy' ), 'choices' => array( 'style1' => esc_html__('Style 1','business-roy'), 'style2' => esc_html__('Style 2','business-roy'), 'style3' => esc_html__('Style 3','business-roy'), ) )); $id = "highlight"; $wp_customize->add_setting("businessroy_{$id}_advance_settings", array( 'transport' => 'postMessage', 'sanitize_callback' => 'businessroy_themes_sanitize_repeater', 'default' => json_encode(array( array( 'block_image' => '', 'block_icon' => 'fa-solid fa-bezier-curve', 'block_title' => '', 'block_desc' => '', 'button_text' => '', 'button_url' => '', ) )) )); $wp_customize->add_control(new Businessroy_Themes_Repeater_Control( $wp_customize, "businessroy_{$id}_advance_settings", array( 'label' => esc_html__('Highlight Items Settings', 'business-roy'), 'section' => "businessroy_{$id}_section", 'settings' => "businessroy_{$id}_advance_settings", 'box_label' => esc_html__('Highlight Item', 'business-roy'), 'add_label' => esc_html__('Add New Item', 'business-roy'), 'limit' => 6, ), array( 'block_image' => array( 'type' => 'upload', 'label' => __("Upload Image", 'business-roy'), ), 'block_icon' => array( 'type' => 'icon', 'label' => esc_html__('Choose Icon', 'business-roy'), 'default' => 'fa-solid fa-bezier-curve' ), 'block_title' => array( 'type' => 'text', 'label' => __("Title", 'business-roy'), ), 'block_desc' => array( 'type' => 'textarea', 'label' => __("Short Description", 'business-roy'), ), 'button_text' => array( 'type' => 'text', 'label' => esc_html__('Button Text', 'business-roy'), 'default' => '' ), 'button_url' => array( 'type' => 'url', 'label' => esc_html__('Button Url', 'business-roy'), 'default' => '' ), ) )); $wp_customize->add_setting('businessroy_highlight_style', array( 'sanitize_callback' => 'businessroy_themes_sanitize_options', 'default' => 'style3', 'transport' => 'postMessage' )); $wp_customize->add_control(new Businessroy_Selector($wp_customize, 'businessroy_highlight_style', array( 'section' => 'businessroy_highlight_section', 'label' => esc_html__('Select Layout', 'business-roy'), 'options' => array( 'style1' => get_template_directory_uri() . '/inc/customizer/images/highlight-section-1.png', 'style3' => get_template_directory_uri() . '/inc/customizer/images/highlight-section-3.png', ) ))); $wp_customize->add_setting('businessroy_pro_highlight', array( 'sanitize_callback' => 'businessroy_sanitize_text' )); $wp_customize->add_control(new Businessroy_Themes_Upgrade_Text($wp_customize, 'businessroy_pro_highlight', array( 'section' => 'businessroy_highlight_section', 'label' => esc_html__('For More Settings,', 'business-roy'), 'choices' => array( esc_html__('(5+) Different Layout & Settings', 'business-roy'), esc_html__('Add Unlimited Highlight Items', 'business-roy'), esc_html__('(5+) Different Section Title Style', 'business-roy'), esc_html__('Advanced Highlight Items Settings', 'business-roy'), esc_html__('More Icon Settings ( Background Color/Color/Border Color/Border Width & Padding )', 'business-roy'), esc_html__('Title, sub title & text color options', 'business-roy'), esc_html__('4+ Different Background Options( Color/Video/Gradient/Image ) ', 'business-roy'), esc_html__('More Than 35+ Top & Bottom Separator Shape Illustrator with Color & Height Option', 'business-roy'), ), 'priority' => 250, ))); $wp_customize->selective_refresh->add_partial( 'businessroy_highlight_refresh', array ( 'settings' => array( 'businessroy_highlight_disable', 'businessroy_highlight_style', 'businessroy_highlight_advance_settings', ), 'selector' => '#highlight-section', 'fallback_refresh' => true, 'container_inclusive' => true, 'render_callback' => function () { return get_template_part( 'section/section', 'highlight' ); } ));