start_controls_section( 'general_section', [ 'label' => esc_html__( 'General', 'aldstore-dropshipping-for-aliexpress' ), ] ); $repeater = new \Elementor\Repeater(); $repeater->add_control( 'image', [ 'label' => esc_html__( 'Image', 'aldstore-dropshipping-for-aliexpress' ), 'type' => \Elementor\Controls_Manager::MEDIA, 'default' => [ 'url' => \Elementor\Utils::get_placeholder_image_src(), ], 'label_block' => true ] ); $repeater->add_control( 'title', [ 'label' => esc_html__( 'Title', 'aldstore-dropshipping-for-aliexpress' ), 'type' => \Elementor\Controls_Manager::TEXT, 'placeholder' => esc_html__( 'Enter your title', 'aldstore-dropshipping-for-aliexpress' ), 'label_block' => true ] ); $repeater->add_control( 'desc', [ 'label' => esc_html__( 'Description', 'aldstore-dropshipping-for-aliexpress' ), 'type' => \Elementor\Controls_Manager::TEXT, 'placeholder' => esc_html__( 'Enter your description', 'aldstore-dropshipping-for-aliexpress' ), 'label_block' => true ] ); $this->add_control( 'list', [ 'label' => __( 'List', 'aldstore-dropshipping-for-aliexpress' ), 'type' => \Elementor\Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'title_field' => '{{ title }}', ] ); $this->end_controls_section(); } protected function render() { $atts = $this->get_settings_for_display(); if ( ! empty( $atts['list'] ) ) { $iconbox_items = ''; if ( ! empty( $atts['list'] ) ) { foreach ( $atts['list'] as $list ) { $image = ! empty( wp_get_attachment_url( $list['image']['id'] ) ) ? wp_get_attachment_url( $list['image']['id'] ) : \Elementor\Utils::get_placeholder_image_src(); $iconbox_items .= '
'; $iconbox_items .= 'img'; if ( ! empty( $list['title'] ) ) { $iconbox_items .= '' . esc_html( $list['title'] ) . ''; } if ( ! empty( $list['desc'] ) ) { $iconbox_items .= esc_html( $list['desc'] ); } $iconbox_items .= '
'; } } ?>