boxtitle = __('Cusomizer Repeater','tx-switch');
if ( ! 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_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_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( $args['id'] ) ) {
$this->id = $args['id'];
}
}
/*Enqueue resources for the control*/
public function enqueue() {
wp_enqueue_style( 'customizer-repeater-font-awesome', get_template_directory_uri().'/customizer-repeater/css/font-awesome.min.css','1.0.0' );
wp_enqueue_style( 'customizer-repeater-admin-stylesheet', get_template_directory_uri().'/customizer-repeater/css/admin-style.css','1.0.0' );
wp_enqueue_script( 'customizer-repeater-script', get_template_directory_uri() . '/customizer-repeater/js/customizer_repeater.js', array('jquery', 'jquery-ui-draggable' ), '1.0.1', true );
wp_enqueue_script( 'customizer-repeater-fontawesome-iconpicker', get_template_directory_uri() . '/customizer-repeater/js/fontawesome-iconpicker.min.js', array( 'jquery' ), '1.0.0', true );
wp_enqueue_script( 'customizer-repeater-iconpicker-control', get_template_directory_uri() . '/customizer-repeater/js/iconpicker-control.js', array( 'jquery' ), '1.0.0', true );
wp_enqueue_style( 'customizer-repeater-fontawesome-iconpicker-script', get_template_directory_uri() . '/customizer-repeater/css/fontawesome-iconpicker.min.css' );
}
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); ?>
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->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->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_title_control==true){
$this->input_control(array(
'label' => __('Title','tx-switch'),
'class' => 'customizer-repeater-title-control',
), $title);
}
if($this->customizer_repeater_subtitle_control==true){
$this->input_control(array(
'label' => __('Subtitle','tx-switch'),
'class' => 'customizer-repeater-subtitle-control',
), $subtitle);
}
if($this->customizer_repeater_text_control==true){
$this->input_control(array(
'label' => __('Text','tx-switch'),
'class' => 'customizer-repeater-text-control',
'type' => 'textarea'
), $text);
}
if($this->customizer_repeater_link_control){
$this->input_control(array(
'label' => __('Link','tx-switch'),
'class' => 'customizer-repeater-link-control',
'sanitize_callback' => 'esc_url'
), $link);
}
if($this->customizer_repeater_shortcode_control==true){
$this->input_control(array(
'label' => __('Shortcode','tx-switch'),
'class' => 'customizer-repeater-shortcode-control',
), $shortcode);
}
if($this->customizer_repeater_repeater_control==true){
$this->repeater_control($repeater);
} ?>
boxtitle); ?>
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_title_control == true ) {
$this->input_control( array(
'label' => __( 'Title', 'tx-switch' ),
'class' => 'customizer-repeater-title-control',
) );
}
if ( $this->customizer_repeater_subtitle_control == true ) {
$this->input_control( array(
'label' => __( 'Subtitle', 'tx-switch' ),
'class' => 'customizer-repeater-subtitle-control'
) );
}
if ( $this->customizer_repeater_text_control == true ) {
$this->input_control( array(
'label' => __( 'Text', 'tx-switch' ),
'class' => 'customizer-repeater-text-control',
'type' => 'textarea'
) );
}
if ( $this->customizer_repeater_link_control == true ) {
$this->input_control( array(
'label' => __( 'Link', 'tx-switch' ),
'class' => 'customizer-repeater-link-control'
) );
}
if ( $this->customizer_repeater_shortcode_control == true ) {
$this->input_control( array(
'label' => __( 'Shortcode', 'tx-switch' ),
'class' => 'customizer-repeater-shortcode-control'
) );
}
if($this->customizer_repeater_repeater_control==true){
$this->repeater_control();
} ?>
>