args = $args; $this->row_label = $args['row_label']; $this->add_new_label = $args['add_new_label']; parent::__construct( $manager, $id, $args ); $this->defaults = $this->setting->default; } /** * Enqueue Scripts * */ function enqueue() { wp_enqueue_media(); wp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/assets/external/fontawesome/css/all.min.css', array(), '6.4.2', 'all' ); wp_enqueue_style( 'blogistic-wp-repeater', get_template_directory_uri() . '/inc/customizer/custom-controls/repeater/repeater.css', array(), BLOGISTIC_VERSION, 'all' ); wp_enqueue_script( 'blogistic-wp-repeater', get_template_directory_uri() . '/inc/customizer/custom-controls/repeater/repeater.js', array( 'jquery' ), BLOGISTIC_VERSION, true ); } /** * For The displaying the structure in Customizer */ public function render_content() { $fields = json_decode( json_encode( $this->args['fields'] ) ); $control_values = $this->value(); $control_values = ( ! empty( $control_values ) ) ? json_decode( $control_values ) : json_decode( json_encode( array( $fields ) ) ); $item_count = 1; ?>
description ) { ?> description ); ?>
row_label; foreach( $control_values as $control_value_key => $control_value ) : if( str_contains( $this->row_label, 'inherit' ) ) { $label_array = explode( "-", $this->row_label ); if( $label_array[1] == 'icon_class' ) { $newlabel_array = explode( "-", $control_value->{$label_array[1]} ); $row_label = $newlabel_array[1]; } else { $row_label = $control_value->{$label_array[1]}; } } ?>
$field_val ) : if( $field_key != 'item_option' ) { $this->render_control( $field_key, $field_val, $control_value ); } else { echo ''; } endforeach; ?>
link() ); ?> value=/>
type; $label = isset( $field->label ) ? $field->label : esc_html__( 'Item Label', 'blogistic' ); $description = isset( $field->description ) ? $field->description : false; $default_value = isset( $field->default ) ? $field->default : ''; $options = isset( $field->options ) ? $field->options : ''; $families = isset( $field->families ) ? $field->families : ''; // filter the contrrol type parameter switch( $type ) { case 'text' : ?>

$field_key ) : if( wp_get_attachment_image_url( $current_item_value->$field_key ) ) : echo ''; endif; else : echo ''; endif; ?>

$field_key ); ?>>

$option_value ) : $is_active_class = ( $current_item_value->$field_key == $option_key ) ? ' isactive' : ''; ?>