start_controls_section( 'general_section', [ 'label' => esc_html__( 'General', 'aldstore-dropshipping-for-aliexpress' ), ] ); $this->add_control( 'style', [ 'label' => esc_html__( 'Style', 'aldstore-dropshipping-for-aliexpress' ), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => array( 'style-01' => esc_html__( 'Style 01', 'aldstore-dropshipping-for-aliexpress' ), 'style-02' => esc_html__( 'Style 02', 'aldstore-dropshipping-for-aliexpress' ), ), 'default' => 'style-01', 'label_block' => true ] ); $this->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 ] ); $this->add_control( 'name', [ 'label' => esc_html__( 'Name', 'aldstore-dropshipping-for-aliexpress' ), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'placeholder' => esc_html__( 'Enter your name', 'aldstore-dropshipping-for-aliexpress' ), 'label_block' => true ] ); $this->add_control( 'rating', [ 'label' => esc_html__( 'Rating(%)', 'aldstore-dropshipping-for-aliexpress' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ '%' ], 'default' => [ 'size' => 100, 'unit' => '%', ], 'selectors' => [ '{{WRAPPER}} .star-rating span' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->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 ] ); $this->add_control( 'desc', [ 'label' => esc_html__( 'Description', 'aldstore-dropshipping-for-aliexpress' ), 'type' => \Elementor\Controls_Manager::WYSIWYG, 'placeholder' => esc_html__( 'Enter your description', 'aldstore-dropshipping-for-aliexpress' ), 'label_block' => true ] ); $this->end_controls_section(); } protected function render() { $atts = $this->get_settings_for_display(); $classes = array( 'aldstore-testimonials' ); $classes[] = $atts['style']; $image = ! empty( wp_get_attachment_url( $atts['image']['id'] ) ) ? wp_get_attachment_url( $atts['image']['id'] ) : \Elementor\Utils::get_placeholder_image_src(); ?>
img