add_section( 'service_section_settings', array( 'title' => esc_html__( 'Service Section', 'bizprime' ), 'priority' => 300, 'capability' => 'edit_theme_options', 'panel' => 'theme_front_page_section', ) ); // Setting - show-service-section. $wp_customize->add_setting( 'theme_options[show-service-section]', array( 'default' => $default['show-service-section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[show-service-section]', array( 'label' => esc_html__( 'Enable Service', 'bizprime' ), 'section' => 'service_section_settings', 'type' => 'checkbox', 'priority' => 100, ) ); // Setting - show-service-section. $wp_customize->add_setting( 'theme_options[select-service-main-page]', array( 'default' => $default['select-service-main-page'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_dropdown_pages', ) ); $wp_customize->add_control( 'theme_options[select-service-main-page]', array( 'label' => esc_html__( 'Select Main work Page', 'bizprime' ), 'section' => 'service_section_settings', 'type' => 'dropdown-pages', 'priority' => 130, ) ); /*No of service*/ $wp_customize->add_setting( 'theme_options[number-of-home-service]', array( 'default' => $default['number-of-home-service'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[number-of-home-service]', array( 'label' => esc_html__( 'Select No Of Service', 'bizprime' ), 'description' => __( 'After choosing "Select No Of Service" option please save and publish and refresh to get actual no of field for icon and page bellow.', 'bizprime' ), 'section' => 'service_section_settings', 'choices' => array( '1' => __( '1', 'bizprime' ), '2' => __( '2', 'bizprime' ), '3' => __( '3', 'bizprime' ), '4' => __( '4', 'bizprime' ), '5' => __( '5', 'bizprime' ), '6' => __( '6', 'bizprime' ), ), 'type' => 'select', 'priority' => 170, ) ); // Setting - select-service-from. $wp_customize->add_setting( 'theme_options[select-service-from]', array( 'default' => $default['select-service-from'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[select-service-from]', array( 'label' => esc_html__( 'Select Service From', 'bizprime' ), 'section' => 'service_section_settings', 'type' => 'select', 'choices' => array( 'from-page' => __( 'Page', 'bizprime' ), 'from-category' => __( 'Category', 'bizprime' ) ), 'priority' => 210, ) ); for ( $i=1; $i <= bizprime_get_option( 'number-of-home-service' ) ; $i++ ) { $wp_customize->add_setting( 'theme_options[select-page-for-service_'. $i .']', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_dropdown_pages', ) ); $wp_customize->add_control( 'theme_options[select-page-for-service_'. $i .']', array( 'input_attrs' => array( 'style' => 'width: 50px;' ), 'label' => __( 'Service From Page', 'bizprime' ) . ' - ' . $i , 'priority' => '120' . $i, 'section' => 'service_section_settings', 'type' => 'dropdown-pages', 'priority' => 220, 'active_callback' => 'bizprime_is_select_page_service', ) ); } // Setting - drop down category for Service. $wp_customize->add_setting( 'theme_options[select-category-for-service]', array( 'default' => $default['select-category-for-service'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Bizprime_Dropdown_Taxonomies_Control( $wp_customize, 'theme_options[select-category-for-service]', array( 'label' => __( 'Category For Service Section', 'bizprime' ), 'description' => __( 'Select category to be shown on tab ', 'bizprime' ), 'section' => 'service_section_settings', 'type' => 'dropdown-taxonomies', 'taxonomy' => 'category', 'priority' => 230, 'active_callback' => 'bizprime_is_select_cat_service', ) ) );