button_label ) ) { $this->button_label = esc_attr__( 'Add new row', 'Kirki' ); } if ( empty( $args['fields'] ) || ! is_array( $args['fields'] ) ) { $args['fields'] = array(); } foreach ( $args['fields'] as $key => $value ) { if ( ! isset( $value['default'] ) ) { $args['fields'][ $key ]['default'] = ''; } if ( ! isset( $value['label'] ) ) { $args['fields'][ $key ]['label'] = ''; } $args['fields'][ $key ]['id'] = $key; } $this->fields = $args['fields']; } public function to_json() { parent::to_json(); $this->json['fields'] = $this->fields; } public function enqueue() { Kirki_Styles_Customizer::enqueue_customizer_control_script( 'kirki-repeater', 'controls/repeater', array( 'jquery', 'customize-base' ), true ); wp_enqueue_script( 'jquery-ui-core' ); wp_enqueue_script( 'jquery-ui-sortable' ); } public function render_content() { ?> help ) : ?> repeater_js_template(); } public function repeater_js_template() { ?>