start_controls_section( 'eael_section_business_reviews_general_settings', [ 'label' => esc_html__( 'General', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_business_reviews_sources', [ 'label' => __( 'Source', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => 'google-reviews', 'options' => [ 'google-reviews' => __( 'Google Reviews', 'essential-addons-for-elementor-lite' ), ], ] ); if ( empty( get_option( 'eael_br_google_place_api_key' ) ) ) { $this->add_control( 'eael_br_google_place_api_key_missing', [ 'type' => Controls_Manager::RAW_HTML, 'raw' => sprintf( __( 'Google Place API key is missing. Please add it from EA Dashboard » Elements » Business Reviews Settings', 'essential-addons-for-elementor-lite' ), esc_attr( site_url( '/wp-admin/admin.php?page=eael-settings' ) ) ), 'content_classes' => 'eael-warning', 'condition' => [ 'eael_business_reviews_sources' => 'google-reviews', ], ] ); } $this->add_control( 'eael_business_reviews_business_place_id', [ 'label' => esc_html__( 'Place ID', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::TEXT, 'description' => sprintf( __( 'Get Place ID from here', 'essential-addons-for-elementor-lite' ), esc_url( 'https://developers.google.com/maps/documentation/javascript/examples/places-placeid-finder' ) ), 'placeholder' => esc_html__( 'Place ID', 'essential-addons-for-elementor-lite' ), 'label_block' => false, 'default' => '', 'dynamic' => [ 'active' => true, ], 'condition' => [ 'eael_business_reviews_sources' => 'google-reviews', ], 'ai' => [ 'active' => false, ], ] ); $this->add_control( 'eael_business_reviews_sort_by', [ 'label' => __( 'Sort By', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => 'most_relevant', 'options' => [ 'most_relevant' => __( 'Most Relevant', 'essential-addons-for-elementor-lite' ), 'newest' => __( 'Newest', 'essential-addons-for-elementor-lite' ), ], ] ); $this->add_control( 'eael_business_reviews_max_reviews', [ 'label' => __( 'Reviews to Show', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::NUMBER, 'min' => 0, 'max' => 5, 'default' => 5, 'description' => __( 'Max 5 reviews, please specify amount.', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_business_reviews_data_cache_time', [ 'label' => __( 'Data Cache Time', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::NUMBER, 'min' => 0, 'default' => 0, 'description' => __( 'Cache expiration time (in Minutes), 0 or empty sets 1 day.', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_business_reviews_localbusiness_schema', [ 'label' => __( 'Local Business Schema', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Enable', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'Disable', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => '', ] ); $this->end_controls_section(); /** * Business Reviews Layout Settings */ $this->start_controls_section( 'eael_section_business_reviews_layout_settings', [ 'label' => esc_html__( 'Layout', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_business_reviews_items_layout', [ 'label' => esc_html__( 'Layout Type', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => 'slider', 'options' => [ 'slider' => esc_html__( 'Slider', 'essential-addons-for-elementor-lite' ), 'grid' => esc_html__( 'Grid', 'essential-addons-for-elementor-lite' ), ] ] ); $this->add_control( 'eael_business_reviews_style_preset_slider', [ 'label' => esc_html__( 'Style Preset', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => 'preset-1', 'options' => [ 'preset-1' => esc_html__( 'Preset 1', 'essential-addons-for-elementor-lite' ), 'preset-2' => esc_html__( 'Preset 2', 'essential-addons-for-elementor-lite' ), 'preset-3' => esc_html__( 'Preset 3', 'essential-addons-for-elementor-lite' ), ], 'condition' => [ 'eael_business_reviews_items_layout' => 'slider' ], ] ); $this->add_control( 'eael_business_reviews_style_preset_grid', [ 'label' => esc_html__( 'Style Preset', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => 'preset-1', 'options' => [ 'preset-1' => esc_html__( 'Preset 1', 'essential-addons-for-elementor-lite' ), 'preset-2' => esc_html__( 'Preset 2', 'essential-addons-for-elementor-lite' ), 'preset-3' => esc_html__( 'Preset 3', 'essential-addons-for-elementor-lite' ), ], 'condition' => [ 'eael_business_reviews_items_layout' => 'grid' ], ] ); $this->add_responsive_control( 'eael_business_reviews_column', [ 'label' => esc_html__( 'Columns', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => '3', 'tablet_default' => '3', 'mobile_default' => '3', 'options' => [ '1' => esc_html__( '1', 'essential-addons-for-elementor-lite' ), '2' => esc_html__( '2', 'essential-addons-for-elementor-lite' ), '3' => esc_html__( '3', 'essential-addons-for-elementor-lite' ), '4' => esc_html__( '4', 'essential-addons-for-elementor-lite' ), ], 'frontend_available' => true, 'condition' => [ 'eael_business_reviews_items_layout' => 'slider', 'eael_business_reviews_style_preset_slider!' => 'preset-2', 'eael_business_reviews_transition_effect!' => 'coverflow' ], ] ); $this->add_responsive_control( 'eael_business_reviews_column_preset_2', [ 'label' => esc_html__( 'Columns', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => '1', 'tablet_default' => '1', 'mobile_default' => '1', 'options' => [ '1' => esc_html__( '1', 'essential-addons-for-elementor-lite' ), '2' => esc_html__( '2', 'essential-addons-for-elementor-lite' ), '3' => esc_html__( '3', 'essential-addons-for-elementor-lite' ), '4' => esc_html__( '4', 'essential-addons-for-elementor-lite' ), ], 'frontend_available' => true, 'condition' => [ 'eael_business_reviews_items_layout' => 'slider', 'eael_business_reviews_style_preset_slider' => 'preset-2', 'eael_business_reviews_transition_effect!' => 'coverflow' ], ] ); $this->add_responsive_control( 'eael_business_reviews_column_grid', [ 'label' => esc_html__( 'Columns', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => '3', 'tablet_default' => '2', 'mobile_default' => '1', 'options' => [ '1' => esc_html__( '1', 'essential-addons-for-elementor-lite' ), '2' => esc_html__( '2', 'essential-addons-for-elementor-lite' ), '3' => esc_html__( '3', 'essential-addons-for-elementor-lite' ), '4' => esc_html__( '4', 'essential-addons-for-elementor-lite' ), ], 'frontend_available' => true, 'condition' => [ 'eael_business_reviews_items_layout' => 'grid', ], ] ); $this->add_control( 'eael_business_reviews_transition_effect', [ 'label' => __( 'Effect', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'default' => 'slide', 'options' => [ 'slide' => __( 'Slide', 'essential-addons-for-elementor-lite' ), 'coverflow' => __( 'Coverflow', 'essential-addons-for-elementor-lite' ), ], 'condition' => [ 'eael_business_reviews_items_layout' => 'slider' ], ] ); $this->add_control( 'eael_business_reviews_item_gap', [ 'label' => __( 'Item Gap', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 30 ], 'range' => [ 'px' => [ 'min' => 10, 'max' => 300, 'step' => 5, ], ], 'size_units' => '', 'condition' => [ 'eael_business_reviews_items_layout' => 'slider' ], ] ); $this->add_control( 'eael_business_reviews_grid_row_gap', [ 'label' => __( 'Row Gap', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 30 ], 'range' => [ 'px' => [ 'min' => 10, 'max' => 300, 'step' => 5, ], ], 'size_units' => '', 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-grid-body' => 'row-gap: {{SIZE}}px;', ], 'condition' => [ 'eael_business_reviews_items_layout' => 'grid' ], ] ); $this->add_control( 'eael_business_reviews_grid_column_gap', [ 'label' => __( 'Column Gap', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 30 ], 'range' => [ 'px' => [ 'min' => 10, 'max' => 300, 'step' => 5, ], ], 'size_units' => '', 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-grid-body' => 'column-gap: {{SIZE}}px;', ], 'condition' => [ 'eael_business_reviews_items_layout' => 'grid' ], ] ); $this->add_control( 'eael_business_reviews_slider_speed', [ 'label' => __( 'Sliding Speed', 'essential-addons-for-elementor-lite' ), 'description' => __( 'Duration of transition between slides (in ms)', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 1000 ], 'range' => [ 'px' => [ 'min' => 100, 'max' => 3000, 'step' => 1, ], ], 'size_units' => '', 'condition' => [ 'eael_business_reviews_items_layout' => 'slider', ], ] ); $this->add_control( 'eael_business_reviews_autoplay', [ 'label' => __( 'Autoplay', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Yes', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'No', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'eael_business_reviews_items_layout' => 'slider' ], ] ); $this->add_control( 'eael_business_reviews_autoplay_delay', [ 'label' => __( 'Autoplay Delay', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 3000 ], 'range' => [ 'px' => [ 'min' => 1000, 'max' => 10000, 'step' => 100, ], ], 'size_units' => '', 'condition' => [ 'eael_business_reviews_items_layout' => 'slider', 'eael_business_reviews_autoplay' => 'yes' ], ] ); $this->add_control( 'eael_business_reviews_loop', [ 'label' => __( 'Infinite Loop', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Yes', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'No', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'eael_business_reviews_items_layout' => 'slider' ], ] ); $this->add_control( 'eael_business_reviews_pause_on_hover', [ 'label' => __( 'Pause on Hover', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Yes', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'No', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'eael_business_reviews_items_layout' => 'slider' ], ] ); $this->add_control( 'eael_business_reviews_grab_cursor', [ 'label' => __( 'Grab Cursor', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Yes', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'No', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => 'yes', 'description' => __( 'Shows grab cursor when you hover over the slider', 'essential-addons-for-elementor-lite' ), 'condition' => [ 'eael_business_reviews_items_layout' => 'slider' ], ] ); $this->add_control( 'eael_business_reviews_navigation', [ 'label' => esc_html__( 'Navigation', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => [ 'eael_business_reviews_items_layout' => 'slider' ], ] ); $this->add_control( 'eael_business_reviews_arrows', [ 'label' => __( 'Arrows', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'Hide', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'eael_business_reviews_items_layout' => 'slider' ], ] ); $this->add_control( 'eael_business_reviews_dots', [ 'label' => __( 'Dots', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'Hide', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => 'yes', 'condition' => [ 'eael_business_reviews_items_layout' => 'slider' ], ] ); $this->end_controls_section(); /** * Business Reviews Content */ $this->start_controls_section( 'eael_section_business_reviews_content', [ 'label' => esc_html__( 'Content', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_business_reviews_business_content', [ 'label' => esc_html__( 'Business', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'eael_business_reviews_business_logo', [ 'label' => __( 'Logo', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'Hide', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'eael_business_reviews_business_logo_icon_new', [ 'label' => __( 'Custom Logo', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::ICONS, 'fa4compatibility' => 'eael_business_reviews_business_logo_icon', 'condition' => [ 'eael_business_reviews_business_logo' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_business_name', [ 'label' => __( 'Name', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'Hide', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'eael_business_reviews_business_name_label', [ 'label' => esc_html__( 'Custom Text', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::TEXT, 'placeholder' => esc_html__( 'Business Name', 'essential-addons-for-elementor-lite' ), 'label_block' => false, 'default' => '', 'condition' => [ 'eael_business_reviews_business_name' => 'yes' ], 'ai' => [ 'active' => false, ], ] ); $this->add_control( 'eael_business_reviews_business_rating', [ 'label' => __( 'Rating', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'Hide', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'eael_business_reviews_google_reviews_label', [ 'label' => esc_html__( 'Custom Text', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::TEXT, 'label_block' => false, 'default' => esc_html__( 'Google Reviews', 'essential-addons-for-elementor-lite' ), 'placeholder' => esc_html__( 'Google Reviews', 'essential-addons-for-elementor-lite' ), 'condition' => [ 'eael_business_reviews_sources' => 'google-reviews', 'eael_business_reviews_business_rating' => 'yes' ], 'ai' => [ 'active' => false, ], ] ); $this->add_control( 'eael_business_reviews_business_address', [ 'label' => __( 'Address', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'Hide', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => '', ] ); $this->add_control( 'eael_business_reviews_review_content', [ 'label' => esc_html__( 'Review', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_control( 'eael_business_reviews_review_time', [ 'label' => __( 'Time', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'Hide', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'eael_business_reviews_review_text', [ 'label' => __( 'Text', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'Hide', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'eael_business_reviews_review_rating', [ 'label' => __( 'Rating', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'Hide', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'eael_business_reviews_review_text_translation', [ 'label' => __( 'Translation', 'essential-addons-for-elementor-lite' ), 'description' => __('Reviews will be translated into English.', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'Hide', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => '', 'condition' => [ 'eael_business_reviews_review_text' => 'yes', ] ] ); $this->add_control( 'eael_business_reviews_review_1_star_hide', [ 'label' => __( 'Hide 1 Star Reviews', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Yes', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'No', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => '', ] ); $this->add_control( 'eael_business_reviews_reviewer_content', [ 'label' => esc_html__( 'Reviewer', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', ] ); $this->add_control( 'eael_business_reviews_reviewer_photo', [ 'label' => __( 'Avatar', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'Hide', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'eael_business_reviews_reviewer_name', [ 'label' => __( 'Name', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => __( 'Show', 'essential-addons-for-elementor-lite' ), 'label_off' => __( 'Hide', 'essential-addons-for-elementor-lite' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->end_controls_section(); /** * ------------------------------------------- * Tab Style (Container Style) * ------------------------------------------- */ $this->start_controls_section( 'eael_section_business_reviews_container_style', [ 'label' => esc_html__( 'Container', 'essential-addons-for-elementor-lite' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'eael_business_reviews_wrap_margin', [ 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-business-reviews-items' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'eael_business_reviews_wrap_padding', [ 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'default' => [ 'size' => 15 ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-business-reviews-items' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'eael_business_reviews_wrap_border_radius', [ 'label' => esc_html__( 'Border Radius', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'max' => 100, ], ], 'default' => [ 'size' => 10, ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-business-reviews-items' => 'border-radius: {{SIZE}}px;', ], ] ); $this->start_controls_tabs( 'eael_business_reviews_wrap_controls_tabs' ); $this->start_controls_tab( 'eael_business_reviews_wrap_control_normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_business_reviews_wrap_normal_background_color', [ 'label' => esc_html__( 'Background Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-business-reviews-items' => 'background: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'eael_business_reviews_wrap_normal_border', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-business-reviews-items', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'eael_business_reviews_wrap_normal_box_shadow', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-business-reviews-items', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'eael_business_reviews_wrap_control_hover', [ 'label' => esc_html__( 'Hover', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_business_reviews_wrap_hover_background_color', [ 'label' => esc_html__( 'Background Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-business-reviews-items:hover' => 'background: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'eael_business_reviews_wrap_hover_border', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-business-reviews-items:hover', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'eael_business_reviews_wrap_hover_box_shadow', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-business-reviews-items:hover', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); /** * ------------------------------------------- * Tab Style ( Header Style ) * ------------------------------------------- */ $this->start_controls_section( 'eael_section_business_reviews_header_style', [ 'label' => esc_html__( 'Header', 'essential-addons-for-elementor-lite' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'eael_business_reviews_header_margin', [ 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-header' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-grid-header' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'eael_business_reviews_header_padding', [ 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-header' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-grid-header' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'eael_business_reviews_header_border_radius', [ 'label' => esc_html__( 'Border Radius', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'max' => 100, ], ], 'default' => [ 'size' => 10, ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-header' => 'border-radius: {{SIZE}}px;', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-grid-header' => 'border-radius: {{SIZE}}px;', ], ] ); $this->start_controls_tabs( 'eael_business_reviews_header_controls_tabs' ); $this->start_controls_tab( 'eael_business_reviews_header_control_normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_business_reviews_header_normal_background_color', [ 'label' => esc_html__( 'Background Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-header' => 'background: {{VALUE}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-grid-header' => 'background: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'eael_business_reviews_header_normal_border', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-header, {{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-grid-header', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'eael_business_reviews_header_normal_box_shadow', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-header, {{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-grid-header', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'eael_business_reviews_header_control_hover', [ 'label' => esc_html__( 'Hover', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_business_reviews_header_hover_background_color', [ 'label' => esc_html__( 'Background Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-header:hover' => 'background: {{VALUE}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-grid-header:hover' => 'background: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'eael_business_reviews_header_hover_border', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-header:hover, {{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-grid-header:hover', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'eael_business_reviews_header_hover_box_shadow', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-header:hover, {{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-grid-header:hover', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control( 'eael_business_reviews_header_alignment', [ 'label' => esc_html__( 'Alignment', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'essential-addons-for-elementor-lite' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => esc_html__( 'Center', 'essential-addons-for-elementor-lite' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => esc_html__( 'Right', 'essential-addons-for-elementor-lite' ), 'icon' => 'eicon-text-align-right', ], ], 'default' => 'center', 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-header' => 'text-align: {{VALUE}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-grid-header' => 'text-align: {{VALUE}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-rating' => 'justify-content: {{VALUE}};', ], ] ); $this->add_control( 'eael_business_reviews_header_business_logo_label', [ 'label' => esc_html__( 'Business Logo', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => [ 'eael_business_reviews_business_logo' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_header_business_logo_size', [ 'label' => __( 'Logo Size', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => 100, ], 'range' => [ 'px' => [ 'min' => 20, 'max' => 500, 'step' => 1, ] ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-logo span' => 'font-size: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-logo img' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-logo svg' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}};' ], 'condition' => [ 'eael_business_reviews_business_logo' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_header_business_logo_color', [ 'label' => esc_html__( 'Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ "{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-logo span" => 'color: {{VALUE}};', "{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-logo svg" => 'color: {{VALUE}} !important; fill: {{VALUE}} !important;', "{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-logo svg path" => 'color: {{VALUE}} !important; fill: {{VALUE}} !important;', ], 'condition' => [ 'eael_business_reviews_business_logo' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_header_business_logo_margin', [ 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-logo' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_business_logo' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_header_business_logo_padding', [ 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-logo' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_business_logo' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_header_business_name_label', [ 'label' => esc_html__( 'Business Name', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => [ 'eael_business_reviews_business_name' => 'yes', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_business_reviews_header_business_name_typography', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-name a', 'condition' => [ 'eael_business_reviews_business_name' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_header_business_name_color', [ 'label' => esc_html__( 'Text Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-name' => 'color: {{VALUE}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-name a' => 'color: {{VALUE}};', ], 'condition' => [ 'eael_business_reviews_business_name' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_header_business_name_margin', [ 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-name' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_business_name' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_header_business_name_padding', [ 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-name' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_business_name' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_header_business_rating_label', [ 'label' => esc_html__( 'Business Rating', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => [ 'eael_business_reviews_business_rating' => 'yes', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_business_reviews_header_business_rating_typography', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-rating, {{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-rating a', 'condition' => [ 'eael_business_reviews_business_rating' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_header_business_rating_color', [ 'label' => esc_html__( 'Text Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-rating' => 'color: {{VALUE}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-rating a' => 'color: {{VALUE}};', ], 'condition' => [ 'eael_business_reviews_business_rating' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_header_business_rating_star_color', [ 'label' => esc_html__( 'Star Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-rating svg' => 'fill: {{VALUE}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-rating svg path' => 'fill: {{VALUE}};', ], 'condition' => [ 'eael_business_reviews_business_rating' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_header_business_rating_star_size', [ 'label' => esc_html__( 'Star Size', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 15, 'max' => 200, 'step' => 1, ], ], 'size_units' => [ 'px' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-rating svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-rating svg path' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_business_rating' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_header_business_rating_margin', [ 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-rating' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_business_rating' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_header_business_rating_padding', [ 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-rating' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_business_rating' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_header_business_address_label', [ 'label' => esc_html__( 'Business Address', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => [ 'eael_business_reviews_business_address' => 'yes', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_business_reviews_header_business_address_typography', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-address, {{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-address a', 'condition' => [ 'eael_business_reviews_business_address' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_header_business_address_color', [ 'label' => esc_html__( 'Text Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-address' => 'color: {{VALUE}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-address a' => 'color: {{VALUE}};', ], 'condition' => [ 'eael_business_reviews_business_address' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_header_business_address_margin', [ 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-address' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_business_address' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_header_business_address_padding', [ 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-business-address' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_business_address' => 'yes', ], ] ); $this->end_controls_section(); /** * ------------------------------------------- * Tab Style ( Content Style ) * ------------------------------------------- */ $this->start_controls_section( 'eael_section_business_reviews_content_style', [ 'label' => esc_html__( 'Content', 'essential-addons-for-elementor-lite' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'eael_business_reviews_content_margin', [ 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-content' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'eael_business_reviews_content_padding', [ 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'eael_business_reviews_content_border_radius', [ 'label' => esc_html__( 'Border Radius', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'max' => 100, ], ], 'default' => [ 'size' => 10, ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-content' => 'border-radius: {{SIZE}}px;', ], ] ); $this->start_controls_tabs( 'eael_business_reviews_content_controls_tabs' ); $this->start_controls_tab( 'eael_business_reviews_content_control_normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_business_reviews_content_normal_background_color', [ 'label' => esc_html__( 'Background Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-content' => 'background: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'eael_business_reviews_content_normal_border', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-content', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'eael_business_reviews_content_normal_box_shadow', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-content', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'eael_business_reviews_content_control_hover', [ 'label' => esc_html__( 'Hover', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_business_reviews_content_hover_background_color', [ 'label' => esc_html__( 'Background Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-content:hover' => 'background: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'eael_business_reviews_content_hover_border', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-content:hover', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'eael_business_reviews_content_hover_box_shadow', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-content:hover', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); /** * ------------------------------------------- * Tab Style ( Reviews Style ) * ------------------------------------------- */ $this->start_controls_section( 'eael_section_business_reviews_reviews_style', [ 'label' => esc_html__( 'Reviews', 'essential-addons-for-elementor-lite' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'eael_business_reviews_reviews_margin', [ 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'eael_business_reviews_reviews_padding', [ 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_control( 'eael_business_reviews_reviews_border_radius', [ 'label' => esc_html__( 'Border Radius', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'max' => 100, ], ], 'default' => [ 'size' => 10, ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-item' => 'border-radius: {{SIZE}}px;', ], ] ); $this->start_controls_tabs( 'eael_business_reviews_reviews_controls_tabs' ); $this->start_controls_tab( 'eael_business_reviews_reviews_control_normal', [ 'label' => esc_html__( 'Normal', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_business_reviews_reviews_normal_background_color', [ 'label' => esc_html__( 'Background Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-item' => 'background: {{VALUE}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-item .preset-extra-shadow svg' => 'fill: {{VALUE}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-item .preset-extra-shadow svg path' => 'fill: {{VALUE}}; display:none', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'eael_business_reviews_reviews_normal_border', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-item', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'eael_business_reviews_reviews_normal_box_shadow', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-item', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'eael_business_reviews_reviews_control_hover', [ 'label' => esc_html__( 'Hover', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_business_reviews_reviews_hover_background_color', [ 'label' => esc_html__( 'Background Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-item:hover' => 'background: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'eael_business_reviews_reviews_hover_border', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-item:hover', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'eael_business_reviews_reviews_hover_box_shadow', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-item:hover', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_control( 'eael_business_reviews_reviewer_photo_label', [ 'label' => esc_html__( 'Reviewer Avatar', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => [ 'eael_business_reviews_reviewer_photo' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_reviewer_photo_margin', [ 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-reviewer-photo' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_reviewer_photo' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_reviewer_photo_padding', [ 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-reviewer-photo' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_reviewer_photo' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_reviewer_photo_size', [ 'label' => esc_html__( 'Photo Size', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 15, 'max' => 100, 'step' => 1, ], ], 'default' => [ 'size' => '50' ], 'size_units' => [ 'px' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-reviewer-photo img' => 'width: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_reviewer_photo' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_reviewer_name_label', [ 'label' => esc_html__( 'Reviewer Name', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => [ 'eael_business_reviews_reviewer_name' => 'yes', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_business_reviews_reviewer_name_typography', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-reviewer-name a', 'condition' => [ 'eael_business_reviews_reviewer_name' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_reviewer_name_color', [ 'label' => esc_html__( 'Text Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-reviewer-name' => 'color: {{VALUE}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-reviewer-name a' => 'color: {{VALUE}};', ], 'condition' => [ 'eael_business_reviews_reviewer_name' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_reviewer_name_margin', [ 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-reviewer-name' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_reviewer_name' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_reviewer_name_padding', [ 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-reviewer-name' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_reviewer_name' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_review_time_label', [ 'label' => esc_html__( 'Review Time', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => [ 'eael_business_reviews_review_time' => 'yes', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_business_reviews_review_time_typography', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-time, {{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-time a', 'condition' => [ 'eael_business_reviews_review_time' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_review_time_color', [ 'label' => esc_html__( 'Text Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-time' => 'color: {{VALUE}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-time a' => 'color: {{VALUE}};', ], 'condition' => [ 'eael_business_reviews_review_time' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_review_time_margin', [ 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-time' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_review_time' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_review_time_padding', [ 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-time' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_review_time' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_review_text_label', [ 'label' => esc_html__( 'Review Text', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => [ 'eael_business_reviews_review_text' => 'yes', ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'eael_business_reviews_review_text_typography', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-text, {{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-text a', 'condition' => [ 'eael_business_reviews_review_text' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_review_text_color', [ 'label' => esc_html__( 'Text Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-text' => 'color: {{VALUE}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-text a' => 'color: {{VALUE}};', ], 'condition' => [ 'eael_business_reviews_review_text' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_review_text_margin', [ 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_review_text' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_review_text_padding', [ 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-text' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_review_text' => 'yes', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'eael_business_reviews_review_text_outer_border', 'selector' => '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-reviews-slider-item .preset-content-body', 'fields_options' => [ 'border' => [ 'default' => 'none', ], 'width' => [ 'default' => [ 'top' => '1', 'right' => '1', 'bottom' => '1', 'left' => '1', 'isLinked' => false, ], ], 'color' => [ 'default' => '#f5f5f5', ], ], 'condition' => [ 'eael_business_reviews_style_preset_slider' => 'preset-3', ], ] ); $this->add_responsive_control( 'eael_business_reviews_review_text_height', [ 'label' => __( 'Height', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 15, 'max' => 500, 'step' => 1, ], ], 'size_units' => [ 'px' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-text' => 'height: {{SIZE}}{{UNIT}}; overflow-y: auto;', ], 'condition' => [ 'eael_business_reviews_review_text' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_review_rating_label', [ 'label' => esc_html__( 'Review Rating', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::HEADING, 'separator' => 'before', 'condition' => [ 'eael_business_reviews_review_rating' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_review_rating_star_color', [ 'label' => esc_html__( 'Star Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-rating svg' => 'fill: {{VALUE}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-rating svg path' => 'fill: {{VALUE}};', ], 'condition' => [ 'eael_business_reviews_review_rating' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_review_rating_star_size', [ 'label' => esc_html__( 'Star Size', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 15, 'max' => 200, 'step' => 1, ], ], 'size_units' => [ 'px' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-rating svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-rating svg path' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_review_rating' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_review_rating_margin', [ 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-rating' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_review_rating' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_review_rating_padding', [ 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em' ], 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-rating' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], 'condition' => [ 'eael_business_reviews_review_rating' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_review_rating_star_alignment', [ 'label' => esc_html__( 'Alignment', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'essential-addons-for-elementor-lite' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => esc_html__( 'Center', 'essential-addons-for-elementor-lite' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => esc_html__( 'Right', 'essential-addons-for-elementor-lite' ), 'icon' => 'eicon-text-align-right', ], ], 'default' => 'center', 'selectors' => [ '{{WRAPPER}} .eael-business-reviews-wrapper .eael-google-review-rating' => 'text-align: {{VALUE}};', ], ] ); $this->end_controls_section(); /** * ------------------------------------------- * Tab Style ( Arrows Style ) * ------------------------------------------- */ $this->start_controls_section( 'eael_section_business_reviews_arrows_style', [ 'label' => esc_html__( 'Arrows', 'essential-addons-for-elementor-lite' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'eael_business_reviews_items_layout' => 'slider', 'eael_business_reviews_arrows' => 'yes', ], ] ); $this->add_control( 'eael_business_reviews_arrows_type', [ 'label' => __( 'Choose Arrow', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SELECT, 'label_block' => true, 'default' => 'fa fa-angle-right', 'options' => [ 'fa fa-angle-right' => __( 'Angle', 'essential-addons-for-elementor-lite' ), 'fa fa-angle-double-right' => __( 'Double Angle', 'essential-addons-for-elementor-lite' ), 'fa fa-chevron-right' => __( 'Chevron', 'essential-addons-for-elementor-lite' ), 'fa fa-chevron-circle-right' => __( 'Chevron Circle', 'essential-addons-for-elementor-lite' ), 'fa fa-arrow-right' => __( 'Arrow', 'essential-addons-for-elementor-lite' ), 'fa fa-long-arrow-right' => __( 'Long Arrow', 'essential-addons-for-elementor-lite' ), 'fa fa-caret-right' => __( 'Caret', 'essential-addons-for-elementor-lite' ), 'fa fa-caret-square-o-right' => __( 'Caret Square', 'essential-addons-for-elementor-lite' ), 'fa fa-arrow-circle-right' => __( 'Arrow Circle', 'essential-addons-for-elementor-lite' ), 'fa fa-arrow-circle-o-right' => __( 'Arrow Circle O', 'essential-addons-for-elementor-lite' ), 'fa fa-toggle-right' => __( 'Toggle', 'essential-addons-for-elementor-lite' ), 'fa fa-hand-o-right' => __( 'Hand', 'essential-addons-for-elementor-lite' ), ], ] ); $this->add_responsive_control( 'eael_business_reviews_arrows_width', [ 'label' => __( 'Width', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => '27' ], 'range' => [ 'px' => [ 'min' => 15, 'max' => 200, 'step' => 1, ], ], 'size_units' => [ 'px' ], 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'eael_business_reviews_arrows_height', [ 'label' => __( 'Height', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => '44' ], 'range' => [ 'px' => [ 'min' => 15, 'max' => 200, 'step' => 1, ], ], 'size_units' => [ 'px' ], 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'eael_business_reviews_arrows_size', [ 'label' => __( 'Font Size', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'default' => [ 'size' => '22' ], 'range' => [ 'px' => [ 'min' => 15, 'max' => 100, 'step' => 1, ], ], 'size_units' => [ 'px' ], 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'font-size: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'eael_business_reviews_arrows_left_position', [ 'label' => __( 'Align Left Arrow', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => - 100, 'max' => 40, 'step' => 1, ], ], 'size_units' => [ 'px' ], 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'left: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'eael_business_reviews_arrows_right_position', [ 'label' => __( 'Align Right Arrow', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => - 100, 'max' => 40, 'step' => 1, ], ], 'size_units' => [ 'px' ], 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-button-next' => 'right: {{SIZE}}{{UNIT}};', ], ] ); $this->start_controls_tabs( 'eael_business_reviews_arrows_tabs_style' ); $this->start_controls_tab( 'eael_business_reviews_arrows_tab_normal', [ 'label' => __( 'Normal', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_business_reviews_arrows_bg_color_normal', [ 'label' => __( 'Background Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'eael_business_reviews_arrows_color_normal', [ 'label' => __( 'Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'color: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'eael_business_reviews_arrows_border_normal', 'label' => __( 'Border', 'essential-addons-for-elementor-lite' ), 'placeholder' => '1px', 'default' => '1px', 'selector' => '{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev' ] ); $this->add_control( 'eael_business_reviews_arrows_border_radius_normal', [ 'label' => __( 'Border Radius', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-button-next, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'eael_business_reviews_arrows_tab_hover', [ 'label' => __( 'Hover', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_business_reviews_arrows_bg_color_hover', [ 'label' => __( 'Background Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-button-next:hover, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev:hover' => 'background-color: {{VALUE}};', ], ] ); $this->add_control( 'eael_business_reviews_arrows_color_hover', [ 'label' => __( 'Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-button-next:hover, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev:hover' => 'color: {{VALUE}};', ], ] ); $this->add_control( 'eael_business_reviews_arrows_border_color_hover', [ 'label' => __( 'Border Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-button-next:hover, {{WRAPPER}} .swiper-container-wrap .swiper-button-prev:hover' => 'border-color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); /** * ------------------------------------------- * Tab Style ( Dots Style ) * ------------------------------------------- */ $this->start_controls_section( 'eael_section_business_reviews_dots_style', [ 'label' => esc_html__( 'Dots', 'essential-addons-for-elementor-lite' ), 'tab' => Controls_Manager::TAB_STYLE, 'condition' => [ 'eael_business_reviews_items_layout' => 'slider', 'eael_business_reviews_dots' => 'yes', ], ] ); $this->add_responsive_control( 'eael_business_reviews_dots_size', [ 'label' => __( 'Size', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 2, 'max' => 40, 'step' => 1, ], ], 'size_units' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}}', ], ] ); $this->add_responsive_control( 'eael_business_reviews_dots_spacing', [ 'label' => __( 'Spacing', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 1, 'max' => 30, 'step' => 1, ], ], 'size_units' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet' => 'margin-left: {{SIZE}}{{UNIT}}; margin-right: {{SIZE}}{{UNIT}}', ], ] ); $this->start_controls_tabs( 'eael_business_reviews_dots_tabs_style' ); $this->start_controls_tab( 'eael_business_reviews_dots_tab_normal', [ 'label' => __( 'Normal', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_business_reviews_dots_color_normal', [ 'label' => __( 'Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet' => 'background: {{VALUE}};', ], ] ); $this->add_control( 'eael_business_reviews_active_dot_color_normal', [ 'label' => __( 'Active Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet-active' => 'background: {{VALUE}};', ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'eael_business_reviews_dots_border_normal', 'label' => __( 'Border', 'essential-addons-for-elementor-lite' ), 'placeholder' => '1px', 'default' => '1px', 'selector' => '{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet', ] ); $this->add_control( 'eael_business_reviews_dots_border_radius_normal', [ 'label' => __( 'Border Radius', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_tab(); $this->start_controls_tab( 'eael_business_reviews_dots_tab_hover', [ 'label' => __( 'Hover', 'essential-addons-for-elementor-lite' ), ] ); $this->add_control( 'eael_business_reviews_dots_color_hover', [ 'label' => __( 'Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet:hover' => 'background: {{VALUE}};', ], ] ); $this->add_control( 'eael_business_reviews_dots_border_color_hover', [ 'label' => __( 'Border Color', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::COLOR, 'default' => '', 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullet:hover' => 'border-color: {{VALUE}};', ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_responsive_control( 'eael_business_reviews_dots_padding', [ 'label' => __( 'Padding', 'essential-addons-for-elementor-lite' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', 'em', '%' ], 'allowed_dimensions' => 'vertical', 'placeholder' => [ 'top' => '', 'right' => 'auto', 'bottom' => '', 'left' => 'auto', ], 'selectors' => [ '{{WRAPPER}} .swiper-container-wrap .swiper-pagination-bullets' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->end_controls_section(); } public function get_business_reviews_settings() { $settings = $this->get_settings_for_display(); $settings['eael_business_reviews_source_key'] = get_option( 'eael_br_google_place_api_key' ); $business_reviews = []; $business_reviews['source'] = ! empty( $settings['eael_business_reviews_sources'] ) ? esc_html( $settings['eael_business_reviews_sources'] ) : 'google-reviews'; $business_reviews['place_id'] = ! empty( $settings['eael_business_reviews_business_place_id'] ) ? esc_html( $settings['eael_business_reviews_business_place_id'] ) : 'ChIJj61dQgK6j4AR4GeTYWZsKWw'; $business_reviews['api_key'] = ! empty( $settings['eael_business_reviews_source_key'] ) ? esc_html( $settings['eael_business_reviews_source_key'] ) : ''; $business_reviews['reviews_sort'] = ! empty( $settings['eael_business_reviews_sort_by'] ) ? esc_html( $settings['eael_business_reviews_sort_by'] ) : 'most_relevant'; $business_reviews['review_text_translation'] = ! empty( $settings['eael_business_reviews_review_text_translation'] ) && 'yes' === $settings['eael_business_reviews_review_text_translation'] ? 1 : 0; $business_reviews['expiration'] = ! empty( $settings['eael_business_reviews_data_cache_time'] ) ? absint( $settings['eael_business_reviews_data_cache_time'] ) * MINUTE_IN_SECONDS : DAY_IN_SECONDS; $business_reviews['md5'] = md5( $business_reviews['api_key'] . $business_reviews['reviews_sort'] . $business_reviews['review_text_translation'] . $this->get_id() ); $business_reviews['cache_key'] = "eael_{$business_reviews['source']}_{$business_reviews['place_id']}_{$business_reviews['expiration']}_{$business_reviews['md5']}_brev_cache"; $business_reviews['layout'] = ! empty( $settings['eael_business_reviews_items_layout'] ) ? $settings['eael_business_reviews_items_layout'] : 'slider'; $business_reviews['preset'] = ! empty( $settings['eael_business_reviews_style_preset_slider'] ) && 'slider' === $business_reviews['layout'] ? $settings['eael_business_reviews_style_preset_slider'] : 'preset-1'; $business_reviews['preset'] = ! empty( $settings['eael_business_reviews_style_preset_grid'] ) && 'grid' === $business_reviews['layout'] ? $settings['eael_business_reviews_style_preset_grid'] : $business_reviews['preset']; $business_reviews['columns'] = ! empty( $settings['eael_business_reviews_column'] ) ? $settings['eael_business_reviews_column'] : 3; $business_reviews['columns_tablet'] = ! empty( $settings['eael_business_reviews_column_tablet'] ) ? $settings['eael_business_reviews_column_tablet'] : 3; $business_reviews['columns_mobile'] = ! empty( $settings['eael_business_reviews_column_mobile'] ) ? $settings['eael_business_reviews_column_mobile'] : 3; $business_reviews['loop'] = ! empty( $settings['eael_business_reviews_loop'] ) && 'yes' === $settings['eael_business_reviews_loop'] ? 1 : 0; $business_reviews['arrows'] = ! empty( $settings['eael_business_reviews_arrows'] ) && 'yes' === $settings['eael_business_reviews_arrows'] ? 1 : 0; $business_reviews['dots'] = ! empty( $settings['eael_business_reviews_dots'] ) && 'yes' === $settings['eael_business_reviews_dots'] ? 1 : 0; $business_reviews['effect'] = ! empty( $settings['eael_business_reviews_transition_effect'] ) ? $settings['eael_business_reviews_transition_effect'] : 'slide'; $business_reviews['item_gap'] = ! empty( $settings['eael_business_reviews_item_gap']['size'] ) ? $settings['eael_business_reviews_item_gap']['size'] : 30; $business_reviews['autoplay'] = ! empty( $settings['eael_business_reviews_autoplay'] ) && 'yes' === $settings['eael_business_reviews_autoplay'] ? 1 : 0; $business_reviews['autoplay_delay'] = ! empty( $settings['eael_business_reviews_autoplay_delay']['size'] ) ? $settings['eael_business_reviews_autoplay_delay']['size'] : 3000; $business_reviews['pause_on_hover'] = ! empty( $settings['eael_business_reviews_pause_on_hover'] ) && 'yes' === $settings['eael_business_reviews_pause_on_hover'] ? 1 : 0; $business_reviews['grab_cursor'] = ! empty( $settings['eael_business_reviews_grab_cursor'] ) && 'yes' === $settings['eael_business_reviews_grab_cursor'] ? 1 : 0; $business_reviews['speed'] = ! empty( $settings['eael_business_reviews_slider_speed']['size'] ) ? $settings['eael_business_reviews_slider_speed']['size'] : 1000; $business_reviews['business_logo'] = ! empty( $settings['eael_business_reviews_business_logo'] ) && 'yes' === $settings['eael_business_reviews_business_logo'] ? 1 : 0; $business_reviews['business_name'] = ! empty( $settings['eael_business_reviews_business_name'] ) && 'yes' === $settings['eael_business_reviews_business_name'] ? 1 : 0; $business_reviews['business_rating'] = ! empty( $settings['eael_business_reviews_business_rating'] ) && 'yes' === $settings['eael_business_reviews_business_rating'] ? 1 : 0; $business_reviews['business_address'] = ! empty( $settings['eael_business_reviews_business_address'] ) && 'yes' === $settings['eael_business_reviews_business_address'] ? 1 : 0; $business_reviews['reviewer_photo'] = ! empty( $settings['eael_business_reviews_reviewer_photo'] ) && 'yes' === $settings['eael_business_reviews_reviewer_photo'] ? 1 : 0; $business_reviews['reviewer_name'] = ! empty( $settings['eael_business_reviews_reviewer_name'] ) && 'yes' === $settings['eael_business_reviews_reviewer_name'] ? 1 : 0; $business_reviews['review_time'] = ! empty( $settings['eael_business_reviews_review_time'] ) && 'yes' === $settings['eael_business_reviews_review_time'] ? 1 : 0; $business_reviews['review_text'] = ! empty( $settings['eael_business_reviews_review_text'] ) && 'yes' === $settings['eael_business_reviews_review_text'] ? 1 : 0; $business_reviews['review_rating'] = ! empty( $settings['eael_business_reviews_review_rating'] ) && 'yes' === $settings['eael_business_reviews_review_rating'] ? 1 : 0; $business_reviews['review_1_star'] = empty( $settings['eael_business_reviews_review_1_star_hide'] ) ? 1 : 0; $business_reviews['reviews_max_count'] = ! empty( $settings['eael_business_reviews_max_reviews'] ) ? intval( $settings['eael_business_reviews_max_reviews'] ) : 5; $business_reviews['business_logo_icon_migrated'] = isset( $settings['__fa4_migrated']['eael_business_reviews_business_logo_icon_new'] ); $business_reviews['business_logo_icon_new'] = empty( $settings['eael_business_reviews_business_logo_icon'] ); $business_reviews['business_logo_icon_new_data'] = ! empty( $settings['eael_business_reviews_business_logo_icon_new'] ) ? $settings['eael_business_reviews_business_logo_icon_new'] : []; $business_reviews['business_logo_icon_data'] = ! empty( $settings['eael_business_reviews_business_logo_icon'] ) ? $settings['eael_business_reviews_business_logo_icon'] : []; $business_reviews['business_name_label'] = ! empty( $settings['eael_business_reviews_business_name_label'] ) ? $settings['eael_business_reviews_business_name_label'] : ''; $business_reviews['google_reviews_label'] = ! empty( $settings['eael_business_reviews_google_reviews_label'] ) ? $settings['eael_business_reviews_google_reviews_label'] : ''; $business_reviews['arrows_type'] = ! empty( $settings['eael_business_reviews_arrows_type'] ) ? $settings['eael_business_reviews_arrows_type'] : 'fa fa-angle-right'; $business_reviews['localbusiness_schema'] = ! empty( $settings['eael_business_reviews_localbusiness_schema'] ) && 'yes' === $settings['eael_business_reviews_localbusiness_schema'] ? 1 : 0; if ( 'grid' === $business_reviews['layout'] ) { $business_reviews['columns'] = ! empty( $settings['eael_business_reviews_column_grid'] ) ? $settings['eael_business_reviews_column_grid'] : 3; $business_reviews['columns_tablet'] = ! empty( $settings['eael_business_reviews_column_grid_tablet'] ) ? $settings['eael_business_reviews_column_grid_tablet'] : 2; $business_reviews['columns_mobile'] = ! empty( $settings['eael_business_reviews_column_grid_mobile'] ) ? $settings['eael_business_reviews_column_grid_mobile'] : 1; $business_reviews['columns_class'] = ! empty( $settings['eael_business_reviews_column_grid'] ) ? 'eael-column-' . $business_reviews['columns'] : 'eael-column-3'; $business_reviews['columns_tablet_class'] = ! empty( $settings['eael_business_reviews_column_grid_tablet'] ) ? 'eael-column-tablet-' . $business_reviews['columns_tablet'] : 'eael-column-tablet-2'; $business_reviews['columns_mobile_class'] = ! empty( $settings['eael_business_reviews_column_grid_mobile'] ) ? 'eael-column-mobile-' . $business_reviews['columns_mobile'] : 'eael-column-mobile-1'; } if ( 'slider' === $business_reviews['layout'] && 'preset-2' === $business_reviews['preset'] ) { $business_reviews['columns'] = ! empty( $settings['eael_business_reviews_column_preset_2'] ) ? $settings['eael_business_reviews_column_preset_2'] : $business_reviews['columns']; $business_reviews['columns_tablet'] = ! empty( $settings['eael_business_reviews_column_preset_2_tablet'] ) ? $settings['eael_business_reviews_column_preset_2_tablet'] : $business_reviews['columns']; $business_reviews['columns_mobile'] = ! empty( $settings['eael_business_reviews_column_preset_2_mobile'] ) ? $settings['eael_business_reviews_column_preset_2_mobile'] : $business_reviews['columns']; } if ( 'coverflow' === $business_reviews['effect'] ) { $business_reviews['columns'] = 3; } return $business_reviews; } /** * API Call to Get Business Reviews */ public function fetch_business_reviews_from_api() { $settings = $this->get_settings_for_display(); $response = []; $error_message = ''; $business_reviews = $this->get_business_reviews_settings(); $items = get_transient( $business_reviews['cache_key'] ); if ( false === $items ) { switch ( $business_reviews['source'] ) { case 'google-reviews': $data = $this->fetch_google_reviews_from_api( $business_reviews ); break; default: $data = $this->fetch_google_reviews_from_api( $business_reviews ); break; } return $data; } $response = $items ? $items : $response; $data = [ 'items' => $response, 'error_message' => $error_message, ]; return $data; } public function fetch_google_reviews_from_api( $business_reviews_settings ) { $business_reviews = $business_reviews_settings; $url = "https://maps.googleapis.com/maps/api/place/details/json"; $param = array(); $error_message = ''; $api_fields = 'formatted_address,international_phone_number,name,rating,reviews,url,user_ratings_total,website,photos'; $api_fields = $business_reviews['localbusiness_schema'] ? 'address_components,' . $api_fields : $api_fields; $args = array( 'key' => sanitize_text_field( $business_reviews['api_key'] ), 'placeid' => sanitize_text_field( $business_reviews['place_id'] ), 'reviews_no_translations' => intval( $business_reviews['review_text_translation'] ) ? false : true, 'fields' => sanitize_text_field( $api_fields ), ); if ( ! empty( $business_reviews['reviews_sort'] ) ) { $args['reviews_sort'] = $business_reviews['reviews_sort']; } $param = array_merge( $param, $args ); $headers = array( 'headers' => array( 'Content-Type' => 'application/json', ) ); $options = array( 'timeout' => 240 ); $options = array_merge( $headers, $options ); if ( empty( $error_message ) ) { $response = wp_remote_get( esc_url_raw( add_query_arg( $param, $url ) ), $options ); $body = json_decode( wp_remote_retrieve_body( $response ) ); $response = 'OK' === $body->status ? $body->result : false; if ( ! empty( $response ) ) { set_transient( $business_reviews['cache_key'], $response, $business_reviews['expiration'] ); } else { $error_message = $this->fetch_google_place_response_error_message( $body->status ); } } $data = [ 'items' => $response, 'error_message' => $error_message, ]; return $data; } public function fetch_google_place_response_error_message( $status = 'OK' ) { $error_message = ''; switch ( $status ) { case 'OK': break; case 'ZERO_RESULTS': $error_message = esc_html__( 'The referenced location, place_id, was valid but no longer refers to a valid result. This may occur if the establishment is no longer in business.', 'essential-addons-for-elementor-lite' ); break; case 'NOT_FOUND': $error_message = esc_html__( 'The referenced location, place_id, was not found in the Places database.', 'essential-addons-for-elementor-lite' ); break; case 'INVALID_REQUEST': $error_message = esc_html__( 'The API request was malformed.', 'essential-addons-for-elementor-lite' ); break; case 'OVER_QUERY_LIMIT': $error_message = esc_html__( 'You have exceeded the QPS limits. Or, Billing has not been enabled on your account. Or, The monthly $200 credit, or a self-imposed usage cap, has been exceeded. Or, The provided method of payment is no longer valid (for example, a credit card has expired).', 'essential-addons-for-elementor-lite' ); break; case 'REQUEST_DENIED': $error_message = esc_html__( 'The request is missing an API key. Or, The key parameter is invalid.', 'essential-addons-for-elementor-lite' ); break; case 'UNKNOWN_ERROR': $error_message = esc_html__( 'An unknown error occurred.', 'essential-addons-for-elementor-lite' ); break; default: break; } return $error_message; } public function print_business_reviews( $business_reviews_items ) { $settings = $this->settings_data = $this->get_settings_for_display(); $business_reviews = $this->business_reviews_data = $this->get_business_reviews_settings(); ob_start(); $this->add_render_attribute( 'eael-business-reviews-wrapper', [ 'class' => [ 'eael-business-reviews-wrapper', 'eael-business-reviews-' . $this->get_id(), 'clearfix', ], 'data-source' => esc_attr( $business_reviews['source'] ), 'data-layout' => esc_attr( $business_reviews['layout'] ), ] ); $this->add_render_attribute( 'eael-business-reviews-items', [ 'id' => 'eael-business-reviews-' . esc_attr( $this->get_id() ), 'class' => [ 'eael-business-reviews-items', 'eael-business-reviews-' . esc_attr( $business_reviews['layout'] ), esc_attr( $business_reviews['preset'] ), ], ] ); ?>
%s %s', esc_html( '' ), esc_html( $google_reviews_data['formatted_address'] ) ); ?>
%s %s', esc_attr( '' ), esc_html( $google_reviews_data['international_phone_number'] ), esc_attr( $google_reviews_data['international_phone_number'] ) ); ?>