$control_type = self::must_exists($type, "type='{$type}'", "type='text'"); $control_value = self::must_exists($value, "value='{$value}'", ''); $control_placeholder = self::must_exists($placeholder, "placeholder='{$placeholder}'", ''); $control_label = self::must_exists($title, "<label class='control-label main-label' for='{$id}'>{$title}</label>", ''); $control_info = self::must_exists($info, "<span class='control-info'>{$info}</span>", ''); $before_control = self::must_exists($before_control, $before_control, "<div class='widget-separator'>"); $after_control = self::must_exists($after_control, $after_control, "</div>"); /* Print markup before control*/ echo $before_control; /* Print label before control */ echo $control_label; wp_enqueue_style('jquery-ui', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.css'); echo "<div id='caviar-" . $id . "' class='repeater-field dynamicAccordion-" . $id . "' data-id='" . $id . "' data-name='" . $name . "' data-fields='" . json_encode($fields) . "' data-fields-count='" . count($value) . "'>"; echo self::each_repeater($title, $id, $name, $value, $fields) . '<div class="widget-separator"> <span id="' . $id . '-clone"></span> </div>'; echo "</div>"; echo "<div class='formRowRepeatingSection'>\n\t \t\t\t<a href='#' class='button button-primary button-large addField'>" . esc_html__('Add Field', 'caviar') . "</a>\n\t \t\t</div>"; /* Print control info text */ echo $control_info; /* Print markup after control*/ echo $after_control; // /* Echo field or return the markup */ // if( $echo === false){ // return $input; // } // else { // echo $input; // } } } Field_Controls::getInstance(); }