Stats section. * * @package business-class/customizer/fields */ /** * Exit if accessed directly. */ if ( ! defined( 'ABSPATH' ) ) { exit; } $panel_name = 'Front Page'; $section_name = 'Stats'; 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' => 'repeater', 'label' => esc_html__( 'Stats', 'business-class' ), 'section' => business_class_get_customizer_section_id( $panel_name, $section_name ), 'priority' => 10, 'row_label' => array( 'type' => 'field', 'value' => esc_html__( 'Stats', 'business-class' ), 'field' => 'title', ), 'choices' => array( 'limit' => 4, ), 'active_callback' => array( array( 'setting' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Enable Section' ), 'operator' => '==', 'value' => true, ), ), 'button_label' => esc_html__( 'Add Stats', 'business-class' ), 'default' => business_class_customizer_defaults( $panel_name, $section_name, 'Stats' ), 'settings' => business_class_customizer_fields_settings_id( $panel_name, $section_name, 'Stats' ), 'fields' => array( 'title' => array( 'type' => 'text', 'label' => esc_html__( 'Stats Title', 'business-class' ), ), 'count' => array( 'type' => 'number', 'description' => esc_html__( 'Number to display in Stats.', 'business-class' ), 'label' => esc_html__( 'Count', 'business-class' ), ), 'icon' => array( 'type' => 'select', 'choices' => business_class_get_fa_classes(), 'label' => esc_html__( 'Stats Icon', 'business-class' ), ), ), ) );