add_field_label = esc_html__( 'Add new logo', 'keenshot' ); if ( ! empty( $args['add_field_label'] ) ) { $this->add_field_label = $args['add_field_label']; } $this->boxtitle = esc_html__( 'Customizer Repeater', 'keenshot' ); if ( ! empty ( $args['item_name'] ) ) { $this->boxtitle = $args['item_name']; } elseif ( ! empty( $this->label ) ) { $this->boxtitle = $this->label; } if ( ! empty( $args['customizer_repeater_image_control'] ) ) { $this->customizer_repeater_image_control = $args['customizer_repeater_image_control']; } if ( ! empty( $args['customizer_repeater_icon_control'] ) ) { $this->customizer_repeater_icon_control = $args['customizer_repeater_icon_control']; } if ( ! empty( $args['customizer_repeater_color_control'] ) ) { $this->customizer_repeater_color_control = $args['customizer_repeater_color_control']; } if ( ! empty( $args['customizer_repeater_color2_control'] ) ) { $this->customizer_repeater_color2_control = $args['customizer_repeater_color2_control']; } if ( ! empty( $args['customizer_repeater_title_control'] ) ) { $this->customizer_repeater_title_control = $args['customizer_repeater_title_control']; } if ( ! empty( $args['customizer_repeater_subtitle_control'] ) ) { $this->customizer_repeater_subtitle_control = $args['customizer_repeater_subtitle_control']; } if ( ! empty( $args['customizer_repeater_text_control'] ) ) { $this->customizer_repeater_text_control = $args['customizer_repeater_text_control']; } if ( ! empty( $args['customizer_repeater_link_control'] ) ) { $this->customizer_repeater_link_control = $args['customizer_repeater_link_control']; } if ( ! empty( $args['customizer_repeater_text2_control'] ) ) { $this->customizer_repeater_text2_control = $args['customizer_repeater_text2_control']; } if ( ! empty( $args['customizer_repeater_link2_control'] ) ) { $this->customizer_repeater_link2_control = $args['customizer_repeater_link2_control']; } if ( ! empty( $args['customizer_repeater_shortcode_control'] ) ) { $this->customizer_repeater_shortcode_control = $args['customizer_repeater_shortcode_control']; } if ( ! empty( $args['customizer_repeater_repeater_control'] ) ) { $this->customizer_repeater_repeater_control = $args['customizer_repeater_repeater_control']; } if ( ! empty( $id ) ) { $this->id = $id; } if ( file_exists( get_template_directory() . '/customizer-repeater/inc/icons.php' ) ) { $this->customizer_icon_container = 'customizer-repeater/inc/icons'; } $allowed_array1 = wp_kses_allowed_html( 'post' ); $allowed_array2 = array( 'input' => array( 'type' => array(), 'class' => array(), 'placeholder' => array() ) ); $this->allowed_html = array_merge( $allowed_array1, $allowed_array2 ); } /*Enqueue resources for the control*/ public function enqueue() { wp_enqueue_style( 'font-awesome', get_template_directory_uri().'/assets/css/fontawesome.min.css', array(), CUSTOMIZER_REPEATER_VERSION ); wp_enqueue_style( 'customizer-repeater-admin-stylesheet', get_template_directory_uri().'/customizer-repeater/css/admin-style.css', array(), CUSTOMIZER_REPEATER_VERSION ); wp_enqueue_style( 'wp-color-picker' ); wp_enqueue_script( 'customizer-repeater-script', get_template_directory_uri() . '/customizer-repeater/js/customizer_repeater.js', array('jquery', 'jquery-ui-draggable', 'wp-color-picker' ), CUSTOMIZER_REPEATER_VERSION, true ); wp_enqueue_script( 'customizer-repeater-fontawesome-iconpicker', get_template_directory_uri() . '/customizer-repeater/js/fontawesome-iconpicker.min.js', array( 'jquery' ), CUSTOMIZER_REPEATER_VERSION, true ); wp_enqueue_style( 'customizer-repeater-fontawesome-iconpicker-script', get_template_directory_uri() . '/customizer-repeater/css/fontawesome-iconpicker.min.css', array(), CUSTOMIZER_REPEATER_VERSION ); } public function render_content() { /*Get default options*/ $this_default = json_decode( $this->setting->default ); /*Get values (json format)*/ $values = $this->value(); /*Decode values*/ $json = json_decode( $values ); if ( ! is_array( $json ) ) { $json = array( $values ); } ?> label ); ?>
iterate_array( $this_default ); ?> link() ); ?> class="customizer-repeater-colector" value=""/> iterate_array(); ?> link() ); ?> class="customizer-repeater-colector"/> iterate_array( $json ); ?> link() ); ?> class="customizer-repeater-colector" value="value() ); ?>"/>
boxtitle ) ?>
id)){ $id = $icon->id; } if(!empty($icon->choice)){ $choice = $icon->choice; } if(!empty($icon->image_url)){ $image_url = $icon->image_url; } if(!empty($icon->icon_value)){ $icon_value = $icon->icon_value; } if(!empty($icon->color)){ $color = $icon->color; } if(!empty($icon->color2)){ $color2 = $icon->color2; } if(!empty($icon->title)){ $title = $icon->title; } if(!empty($icon->subtitle)){ $subtitle = $icon->subtitle; } if(!empty($icon->text)){ $text = $icon->text; } if(!empty($icon->link)){ $link = $icon->link; } if(!empty($icon->text2)){ $text2 = $icon->text2; } if(!empty($icon->link2)){ $link2 = $icon->link2; } if(!empty($icon->shortcode)){ $shortcode = $icon->shortcode; } if(!empty($icon->social_repeater)){ $repeater = $icon->social_repeater; } if($this->customizer_repeater_image_control == true && $this->customizer_repeater_icon_control == true) { $this->icon_type_choice( $choice ); } if($this->customizer_repeater_image_control == true){ $this->image_control($image_url, $choice); } if($this->customizer_repeater_icon_control == true){ $this->icon_picker_control($icon_value, $choice); } if($this->customizer_repeater_color_control == true){ $this->input_control(array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Color','keenshot' ), $this->id, 'customizer_repeater_color_control' ), 'class' => 'customizer-repeater-color-control', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', 'color', $this->id, 'customizer_repeater_color_control' ), 'sanitize_callback' => 'sanitize_hex_color', 'choice' => $choice, ), $color); } if($this->customizer_repeater_color2_control == true){ $this->input_control(array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Color','keenshot' ), $this->id, 'customizer_repeater_color2_control' ), 'class' => 'customizer-repeater-color2-control', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', 'color', $this->id, 'customizer_repeater_color2_control' ), 'sanitize_callback' => 'sanitize_hex_color' ), $color2); } if($this->customizer_repeater_title_control==true){ $this->input_control(array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Member Name','keenshot' ), $this->id, 'customizer_repeater_title_control' ), 'class' => 'customizer-repeater-title-control', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', '', $this->id, 'customizer_repeater_title_control' ), ), $title); } if($this->customizer_repeater_subtitle_control==true){ $this->input_control(array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Position','keenshot' ), $this->id, 'customizer_repeater_subtitle_control' ), 'class' => 'customizer-repeater-subtitle-control', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', '', $this->id, 'customizer_repeater_subtitle_control' ), ), $subtitle); } if($this->customizer_repeater_text_control==true){ $this->input_control(array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Text','keenshot' ), $this->id, 'customizer_repeater_text_control' ), 'class' => 'customizer-repeater-text-control', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', 'textarea', $this->id, 'customizer_repeater_text_control' ), ), $text); } if($this->customizer_repeater_link_control){ $this->input_control(array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Link','keenshot' ), $this->id, 'customizer_repeater_link_control' ), 'class' => 'customizer-repeater-link-control', 'sanitize_callback' => 'esc_url_raw', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', '', $this->id, 'customizer_repeater_link_control' ), ), $link); } if($this->customizer_repeater_text2_control==true){ $this->input_control(array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Text','keenshot' ), $this->id, 'customizer_repeater_text2_control' ), 'class' => 'customizer-repeater-text2-control', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', 'textarea', $this->id, 'customizer_repeater_text2_control' ), ), $text2); } if($this->customizer_repeater_link2_control){ $this->input_control(array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Link','keenshot' ), $this->id, 'customizer_repeater_link2_control' ), 'class' => 'customizer-repeater-link2-control', 'sanitize_callback' => 'esc_url_raw', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', '', $this->id, 'customizer_repeater_link2_control' ), ), $link2); } if($this->customizer_repeater_shortcode_control==true){ $this->input_control(array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Shortcode','keenshot' ), $this->id, 'customizer_repeater_shortcode_control' ), 'class' => 'customizer-repeater-shortcode-control', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', '', $this->id, 'customizer_repeater_shortcode_control' ), ), $shortcode); } if($this->customizer_repeater_repeater_control==true){ $this->repeater_control($repeater); } ?>
boxtitle ,'keenshot') ?>
customizer_repeater_image_control == true && $this->customizer_repeater_icon_control == true ) { $this->icon_type_choice(); } if ( $this->customizer_repeater_image_control == true ) { $this->image_control(); } if ( $this->customizer_repeater_icon_control == true ) { $this->icon_picker_control(); } if($this->customizer_repeater_color_control==true){ $this->input_control(array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Color','keenshot' ), $this->id, 'customizer_repeater_color_control' ), 'class' => 'customizer-repeater-color-control', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', 'color', $this->id, 'customizer_repeater_color_control' ), 'sanitize_callback' => 'sanitize_hex_color' ) ); } if($this->customizer_repeater_color2_control==true){ $this->input_control(array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Color','keenshot' ), $this->id, 'customizer_repeater_color2_control' ), 'class' => 'customizer-repeater-color2-control', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', 'color', $this->id, 'customizer_repeater_color2_control' ), 'sanitize_callback' => 'sanitize_hex_color' ) ); } if ( $this->customizer_repeater_title_control == true ) { $this->input_control( array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Title','keenshot' ), $this->id, 'customizer_repeater_title_control' ), 'class' => 'customizer-repeater-title-control', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', '', $this->id, 'customizer_repeater_title_control' ), ) ); } if ( $this->customizer_repeater_subtitle_control == true ) { $this->input_control( array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Subtitle','keenshot' ), $this->id, 'customizer_repeater_subtitle_control' ), 'class' => 'customizer-repeater-subtitle-control', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', '', $this->id, 'customizer_repeater_subtitle_control' ), ) ); } if ( $this->customizer_repeater_text_control == true ) { $this->input_control( array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Text','keenshot' ), $this->id, 'customizer_repeater_text_control' ), 'class' => 'customizer-repeater-text-control', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', 'textarea', $this->id, 'customizer_repeater_text_control' ), ) ); } if ( $this->customizer_repeater_link_control == true ) { $this->input_control( array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Link','keenshot' ), $this->id, 'customizer_repeater_link_control' ), 'class' => 'customizer-repeater-link-control', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', '', $this->id, 'customizer_repeater_link_control' ), ) ); } if ( $this->customizer_repeater_text2_control == true ) { $this->input_control( array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Text','keenshot' ), $this->id, 'customizer_repeater_text2_control' ), 'class' => 'customizer-repeater-text2-control', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', 'textarea', $this->id, 'customizer_repeater_text2_control' ), ) ); } if ( $this->customizer_repeater_link2_control == true ) { $this->input_control( array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Link','keenshot' ), $this->id, 'customizer_repeater_link2_control' ), 'class' => 'customizer-repeater-link2-control', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', '', $this->id, 'customizer_repeater_link2_control' ), ) ); } if ( $this->customizer_repeater_shortcode_control == true ) { $this->input_control( array( 'label' => apply_filters('keenshot_repeater_input_labels_filter', esc_html__( 'Shortcode','keenshot' ), $this->id, 'customizer_repeater_shortcode_control' ), 'class' => 'customizer-repeater-shortcode-control', 'type' => apply_filters('keenshot_customizer_repeater_input_types_filter', '', $this->id, 'customizer_repeater_shortcode_control' ), ) ); } if($this->customizer_repeater_repeater_control==true){ $this->repeater_control(); } ?>
>
>
>
customizer_icon_container ); ?>
customizer_icon_container ); ?>
customizer_icon_container ); ?>