add_section( 'team_section_settings', array( 'title' => esc_html__( 'Team Section', 'bizprime' ), 'priority' => 300, 'capability' => 'edit_theme_options', 'panel' => 'theme_front_page_section', ) ); // Setting - show-team-section. $wp_customize->add_setting( 'theme_options[show-team-section]', array( 'default' => $default['show-team-section'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[show-team-section]', array( 'label' => esc_html__( 'Enable Team', 'bizprime' ), 'section' => 'team_section_settings', 'type' => 'checkbox', 'priority' => 100, ) ); /*No of team*/ $wp_customize->add_setting( 'theme_options[number-of-home-team]', array( 'default' => $default['number-of-home-team'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[number-of-home-team]', array( 'label' => esc_html__( 'Select No Of Team', 'bizprime' ), 'description' => __( 'If you are using selection "from page" option please refresh to get actual no of page', 'bizprime' ), 'section' => 'team_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' => 105, ) ); /*content excerpt in team*/ $wp_customize->add_setting( 'theme_options[number-of-content-home-team]', array( 'default' => $default['number-of-content-home-team'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_positive_integer', ) ); $wp_customize->add_control( 'theme_options[number-of-content-home-team]', array( 'label' => esc_html__( 'Select No Words Of Team', 'bizprime' ), 'section' => 'team_section_settings', 'type' => 'number', 'priority' => 110, 'input_attrs' => array( 'min' => 1, 'max' => 200, 'style' => 'width: 150px;' ), ) ); // Setting - select-team-from. $wp_customize->add_setting( 'theme_options[select-team-from]', array( 'default' => $default['select-team-from'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[select-team-from]', array( 'label' => esc_html__( 'Select Team From', 'bizprime' ), 'section' => 'team_section_settings', 'type' => 'select', 'choices' => array( 'from-page' => __( 'Page', 'bizprime' ), 'from-category' => __( 'Category', 'bizprime' ) ), 'priority' => 110, ) ); for ( $i=1; $i <= bizprime_get_option( 'number-of-home-team' ) ; $i++ ) { $wp_customize->add_setting( 'theme_options[select-page-for-team_'. $i .']', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bizprime_sanitize_dropdown_pages', ) ); $wp_customize->add_control( 'theme_options[select-page-for-team_'. $i .']', array( 'input_attrs' => array( 'style' => 'width: 50px;' ), 'label' => __( 'Team From Page', 'bizprime' ) . ' - ' . $i , 'priority' => '120' . $i, 'section' => 'team_section_settings', 'type' => 'dropdown-pages', 'priority' => 120, 'active_callback' => 'bizprime_is_select_page_team', ) ); } // Setting - drop down category for team. $wp_customize->add_setting( 'theme_options[select-category-for-team]', array( 'default' => $default['select-category-for-team'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Bizprime_Dropdown_Taxonomies_Control( $wp_customize, 'theme_options[select-category-for-team]', array( 'label' => __( 'Category For Team Section', 'bizprime' ), 'description' => __( 'Select category to be shown on tab ', 'bizprime' ), 'section' => 'team_section_settings', 'type' => 'dropdown-taxonomies', 'taxonomy' => 'category', 'priority' => 130, 'active_callback' => 'bizprime_is_select_cat_team', ) ) );