Our Team. * * @package business-class/customizer/fields */ /** * Exit if accessed directly. */ if ( ! defined( 'ABSPATH' ) ) { exit; } $panel_name = 'Front Page'; $section_name = 'Our Team'; Business_Class_Customizer::add_field( BUSINESS_CLASS_CUSTOMIZER_THEME_CONFIG_ID, array( 'type' => 'toggle', 'settings' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Enable Section' ), 'label' => __( 'Enable Section?', 'business-class' ), 'section' => business_class_get_customizer_section_id( $panel_name, $section_name ), 'default' => business_class_customizer_defaults( $panel_name, $section_name, 'Enable Section' ), 'priority' => 10, ) ); Business_Class_Customizer::add_field( BUSINESS_CLASS_CUSTOMIZER_THEME_CONFIG_ID, array( 'type' => 'text', 'settings' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Heading' ), 'label' => __( 'Heading', 'business-class' ), 'section' => business_class_get_customizer_section_id( $panel_name, $section_name ), 'default' => business_class_customizer_defaults( $panel_name, $section_name, 'Heading' ), 'priority' => 10, 'active_callback' => array( array( 'setting' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Enable Section' ), 'operator' => '==', 'value' => true, ), ), ) ); Business_Class_Customizer::add_field( BUSINESS_CLASS_CUSTOMIZER_THEME_CONFIG_ID, array( 'type' => 'textarea', 'settings' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Sub Heading' ), 'label' => __( 'Sub Heading', 'business-class' ), 'section' => business_class_get_customizer_section_id( $panel_name, $section_name ), 'default' => business_class_customizer_defaults( $panel_name, $section_name, 'Sub Heading' ), 'priority' => 10, 'active_callback' => array( array( 'setting' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Enable Section' ), 'operator' => '==', 'value' => true, ), ), ) ); Business_Class_Customizer::add_field( BUSINESS_CLASS_CUSTOMIZER_THEME_CONFIG_ID, array( 'type' => 'select', 'settings' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Contents' ), 'label' => __( 'Contents', 'business-class' ), 'section' => business_class_get_customizer_section_id( $panel_name, $section_name ), 'default' => business_class_customizer_defaults( $panel_name, $section_name, 'Contents' ), 'priority' => 10, 'choices' => array( 'by_category' => esc_html__( 'By Category ( Posts Listings )', 'business-class' ), 'by_repeater' => esc_html__( 'By Repeater ( Manual Entry )', 'business-class' ), ), 'active_callback' => array( array( 'setting' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Enable Section' ), 'operator' => '==', 'value' => true, ), ), ) ); Business_Class_Customizer::add_field( BUSINESS_CLASS_CUSTOMIZER_THEME_CONFIG_ID, array( 'type' => 'select', 'settings' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Select Category' ), 'label' => __( 'Select Category', 'business-class' ), 'section' => business_class_get_customizer_section_id( $panel_name, $section_name ), 'default' => business_class_customizer_defaults( $panel_name, $section_name, 'Select Category' ), 'choices' => business_class_customizer_get_terms(), 'placeholder' => esc_html__( 'Select Category', 'business-class' ), 'priority' => 10, 'active_callback' => array( array( 'setting' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Enable Section' ), 'operator' => '==', 'value' => true, ), array( 'setting' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Contents' ), 'operator' => '==', 'value' => 'by_category', ), ), ) ); Business_Class_Customizer::add_field( BUSINESS_CLASS_CUSTOMIZER_THEME_CONFIG_ID, array( 'type' => 'number', 'settings' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Number Of Items' ), 'label' => __( 'Number Of Items', 'business-class' ), 'description' => esc_html__( 'Enter the number of team members you want to list. Max: No Limit', 'business-class' ), 'section' => business_class_get_customizer_section_id( $panel_name, $section_name ), 'default' => business_class_customizer_defaults( $panel_name, $section_name, 'Number Of Items' ), 'choices' => array( 'min' => 1, 'step' => 1, ), 'placeholder' => esc_html__( 'Number Of Items', 'business-class' ), 'priority' => 10, 'active_callback' => array( array( 'setting' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Enable Section' ), 'operator' => '==', 'value' => true, ), array( 'setting' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Contents' ), 'operator' => '==', 'value' => 'by_category', ), ), ) ); Business_Class_Customizer::add_field( BUSINESS_CLASS_CUSTOMIZER_THEME_CONFIG_ID, array( 'type' => 'repeater', 'label' => esc_html__( 'Teams', 'business-class' ), 'section' => business_class_get_customizer_section_id( $panel_name, $section_name ), 'priority' => 10, 'row_label' => array( 'type' => 'field', 'value' => esc_html__( 'Staff', 'business-class' ), 'field' => 'name', ), 'choices' => array( 'limit' => 5, ), 'active_callback' => array( array( 'setting' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Enable Section' ), 'operator' => '==', 'value' => true, ), array( 'setting' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Contents' ), 'operator' => '==', 'value' => 'by_repeater', ), ), 'default' => business_class_customizer_defaults( $panel_name, $section_name, 'Teams' ), 'button_label' => esc_html__( 'Add Staff', 'business-class' ), 'settings' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Teams' ), 'fields' => array( 'name' => array( 'type' => 'text', 'label' => esc_html__( 'Staff Name', 'business-class' ), ), 'position' => array( 'type' => 'text', 'label' => esc_html__( 'Staff Position', 'business-class' ), ), 'image' => array( 'type' => 'image', 'label' => esc_html__( 'Staff Picture', 'business-class' ), ), 'social_links' => array( 'type' => 'textarea', 'label' => esc_html__( 'Social Links', 'business-class' ), 'description' => esc_html__( 'Enter staff social links separated with comma. ex: facebook.com/john-doe, instagram.com/john-doe', 'business-class' ), ), ), ) );