This commit is contained in:
Roman Pyrih
2026-04-15 15:50:03 +02:00
parent 0d1de6c85c
commit 98ccfe6d65
14 changed files with 1251 additions and 5 deletions

View File

@@ -0,0 +1 @@
.elementor-review-box{position:relative;display:flex;flex-direction:column;justify-content:space-between;padding:42px 48px;background:#fff;border:1px solid #e2e4e9;border-radius:28px;box-shadow:0 4px 14px rgba(16,24,40,.06);overflow:hidden;transition:all .3s cubic-bezier(0.4, 0, 0.2, 1)}.elementor-review-box:hover{border-color:rgba(238,43,140,.2) !important;box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1)}.elementor-review-box__top{width:100%;display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:16px}.elementor-review-box__stars{display:inline-flex;align-items:center;flex-wrap:wrap;gap:8px;line-height:1}.elementor-review-box__star{font-size:28px;line-height:1;color:#f4c214;display:inline-flex}.elementor-review-box__quote{opacity:.6}.elementor-review-box__quote svg{position:absolute;top:16px;right:16px;width:48px;height:48px;line-height:1;color:#f6d6e6;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.elementor-review-box__content{width:100%}.elementor-review-box__text{font-size:24px;line-height:1.55;font-weight:400;color:#222b3a;letter-spacing:-0.01em;word-break:break-word}.elementor-review-box__footer{width:100%;display:flex;align-items:center;gap:20px}.elementor-review-box__avatar{border-radius:50%;background:#f6d6e6;color:#e23d94;display:inline-flex;align-items:center;justify-content:center;text-align:center;font-size:28px;font-weight:700;line-height:1;text-transform:uppercase}.elementor-review-box__author{display:flex;flex-direction:column;gap:4px;min-width:0}.elementor-review-box__name{font-size:24px;line-height:1.2;font-weight:700;color:#1f2737;word-break:break-word}.elementor-review-box__location{font-size:18px;line-height:1.35;font-weight:400;color:#667085;word-break:break-word}/*# sourceMappingURL=main.css.map */

View File

@@ -0,0 +1 @@
{"version":3,"sources":["main.scss"],"names":[],"mappings":"AAAA,sBACC,iBAAA,CACA,YAAA,CACA,qBAAA,CACA,6BAAA,CACA,iBAAA,CACA,eAAA,CACA,wBAAA,CACA,kBAAA,CACA,wCAAA,CACA,eAAA,CACA,+CAAA,CAEA,4BACC,2CAAA,CACA,wEAAA,CAID,2BACC,UAAA,CACA,YAAA,CACA,sBAAA,CACA,6BAAA,CACA,QAAA,CACA,kBAAA,CAGD,6BACC,mBAAA,CACA,kBAAA,CACA,cAAA,CACA,OAAA,CACA,aAAA,CAGD,4BACC,cAAA,CACA,aAAA,CACA,aAAA,CACA,mBAAA,CAGD,6BACC,UAAA,CACA,iCACC,iBAAA,CACA,QAAA,CACA,UAAA,CACA,UAAA,CACA,WAAA,CACA,aAAA,CACA,aAAA,CACA,mBAAA,CACA,wBAAA,CAAA,qBAAA,CAAA,gBAAA,CAIF,+BACC,UAAA,CAGD,4BACC,cAAA,CACA,gBAAA,CACA,eAAA,CACA,aAAA,CACA,sBAAA,CACA,qBAAA,CAGD,8BACC,UAAA,CACA,YAAA,CACA,kBAAA,CACA,QAAA,CAGD,8BACC,iBAAA,CACA,kBAAA,CACA,aAAA,CACA,mBAAA,CACA,kBAAA,CACA,sBAAA,CACA,iBAAA,CACA,cAAA,CACA,eAAA,CACA,aAAA,CACA,wBAAA,CAGD,8BACC,YAAA,CACA,qBAAA,CACA,OAAA,CACA,WAAA,CAGD,4BACC,cAAA,CACA,eAAA,CACA,eAAA,CACA,aAAA,CACA,qBAAA,CAGD,gCACC,cAAA,CACA,gBAAA,CACA,eAAA,CACA,aAAA,CACA,qBAAA","file":"main.css"}

View File

@@ -0,0 +1,115 @@
.elementor-review-box {
position: relative;
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 42px 48px;
background: #fff;
border: 1px solid #e2e4e9;
border-radius: 28px;
box-shadow: 0 4px 14px rgba(16, 24, 40, 0.06);
overflow: hidden;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
&:hover {
border-color: #ee2b8c33 !important;
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1),
0 4px 6px -4px rgb(0 0 0 / 0.1);
}
&__top {
width: 100%;
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 20px;
margin-bottom: 16px;
}
&__stars {
display: inline-flex;
align-items: center;
flex-wrap: wrap;
gap: 8px;
line-height: 1;
}
&__star {
font-size: 28px;
line-height: 1;
color: #f4c214;
display: inline-flex;
}
&__quote {
opacity: 0.6;
svg {
position: absolute;
top: 16px;
right: 16px;
width: 48px;
height: 48px;
line-height: 1;
color: #f6d6e6;
pointer-events: none;
user-select: none;
}
}
&__content {
width: 100%;
}
&__text {
font-size: 24px;
line-height: 1.55;
font-weight: 400;
color: #222b3a;
letter-spacing: -0.01em;
word-break: break-word;
}
&__footer {
width: 100%;
display: flex;
align-items: center;
gap: 20px;
}
&__avatar {
border-radius: 50%;
background: #f6d6e6;
color: #e23d94;
display: inline-flex;
align-items: center;
justify-content: center;
text-align: center;
font-size: 28px;
font-weight: 700;
line-height: 1;
text-transform: uppercase;
}
&__author {
display: flex;
flex-direction: column;
gap: 4px;
min-width: 0;
}
&__name {
font-size: 24px;
line-height: 1.2;
font-weight: 700;
color: #1f2737;
word-break: break-word;
}
&__location {
font-size: 18px;
line-height: 1.35;
font-weight: 400;
color: #667085;
word-break: break-word;
}
}

View File

@@ -0,0 +1,5 @@
jQuery(document).ready(function ($) {
$(window).on('scroll', function () {
$('#header-box').toggleClass('box-fixed', $(this).scrollTop() > 0);
});
});

View File

@@ -0,0 +1,60 @@
<?php
/**
* Plugin Name: Elementor Addon
* Description: Simple hello world widgets for Elementor.
* Version: 1.0.0
* Author: Elementor Developer
* Author URI: https://developers.elementor.com/
* Text Domain: elementor-addon
*
* Requires Plugins: elementor
* Elementor tested up to: 3.21.0
* Elementor Pro tested up to: 3.21.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Register widget files
*/
function register_hello_world_widget( $widgets_manager ) {
require_once( __DIR__ . '/widgets/review-box.php' );
$widgets_manager->register( new \Elementor_Review_Box() );
}
add_action( 'elementor/widgets/register', 'register_hello_world_widget' );
/**
* Register scripts/styles only.
* Do not enqueue them globally.
*/
function elementor_addon_register_assets() {
$css_path = plugin_dir_path( __FILE__ ) . 'assets/css/main.css';
$css_url = plugin_dir_url( __FILE__ ) . 'assets/css/main.css';
$css_ver = file_exists( $css_path ) ? filemtime( $css_path ) : '1.0.0';
$js_path = plugin_dir_path( __FILE__ ) . 'assets/js/main.js';
$js_url = plugin_dir_url( __FILE__ ) . 'assets/js/main.js';
$js_ver = file_exists( $js_path ) ? filemtime( $js_path ) : '1.0.0';
// Widget CSS
wp_register_style(
'elementor-addon-main-css',
$css_url,
[],
$css_ver
);
// Widget JS
wp_register_script(
'elementor-addon-main-js',
$js_url,
[ 'jquery' ],
$js_ver,
true
);
}
add_action( 'elementor/frontend/after_register_styles', 'elementor_addon_register_assets' );
add_action( 'elementor/frontend/after_register_scripts', 'elementor_addon_register_assets' );

View File

@@ -0,0 +1,591 @@
<?php
if (!defined('ABSPATH')) {
exit;
}
use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use Elementor\Group_Control_Box_Shadow;
use Elementor\Group_Control_Border;
use Elementor\Group_Control_Typography;
class Elementor_Review_Box extends Widget_Base {
public function get_name() {
return 'review_box';
}
public function get_title() {
return esc_html__('Review Box', 'elementor-addon');
}
public function get_icon() {
return 'eicon-testimonial';
}
public function get_categories() {
return ['basic'];
}
public function get_keywords() {
return ['review', 'testimonial', 'feedback', 'rating'];
}
public function get_style_depends() {
return ['elementor-addon-main-css'];
}
public function get_script_depends() {
return ['elementor-addon-main-js'];
}
protected function register_controls() {
$this->start_controls_section(
'section_content',
[
'label' => esc_html__('Content', 'elementor-addon'),
'tab' => Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
'rating',
[
'label' => esc_html__('Rating', 'elementor-addon'),
'type' => Controls_Manager::SELECT,
'default' => '5',
'options' => [
'0' => '0',
'1' => '1',
'2' => '2',
'3' => '3',
'4' => '4',
'5' => '5',
],
]
);
$this->add_control(
'review_text',
[
'label' => esc_html__('Review Text', 'elementor-addon'),
'type' => Controls_Manager::TEXTAREA,
'rows' => 6,
'default' => '"Uitstekend schilderwerk! Het team was professioneel, punctueel en het eindresultaat is prachtig. Ons hele huis ziet er weer als nieuw uit."',
]
);
$this->add_control(
'author_name',
[
'label' => esc_html__('Author Name', 'elementor-addon'),
'type' => Controls_Manager::TEXT,
'default' => 'Peter de Vries',
]
);
$this->add_control(
'author_location',
[
'label' => esc_html__('Location', 'elementor-addon'),
'type' => Controls_Manager::TEXT,
'default' => 'Amsterdam',
]
);
$this->add_control(
'author_initials',
[
'label' => esc_html__('Initials', 'elementor-addon'),
'type' => Controls_Manager::TEXT,
'default' => 'PV',
'description' => esc_html__('Displayed inside the circle avatar.', 'elementor-addon'),
]
);
$this->add_control(
'show_quote_icon',
[
'label' => esc_html__('Show Quote Icon', 'elementor-addon'),
'type' => Controls_Manager::SWITCHER,
'label_on' => esc_html__('Show', 'elementor-addon'),
'label_off' => esc_html__('Hide', 'elementor-addon'),
'return_value' => 'yes',
'default' => 'yes',
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_box_style',
[
'label' => esc_html__('Box', 'elementor-addon'),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_control(
'box_bg_color',
[
'label' => esc_html__('Background Color', 'elementor-addon'),
'type' => Controls_Manager::COLOR,
'default' => '#FFFFFF',
'selectors' => [
'{{WRAPPER}} .elementor-review-box' => 'background-color: {{VALUE}};',
],
]
);
$this->add_control(
'box_border_color',
[
'label' => esc_html__('Border Color', 'elementor-addon'),
'type' => Controls_Manager::COLOR,
'default' => '#EAEAEA',
'selectors' => [
'{{WRAPPER}} .elementor-review-box' => 'border-color: {{VALUE}};',
],
]
);
$this->add_responsive_control(
'box_border_radius',
[
'label' => esc_html__('Border Radius', 'elementor-addon'),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em', 'rem'],
'default' => [
'top' => 28,
'right' => 28,
'bottom' => 28,
'left' => 28,
'unit' => 'px',
],
'selectors' => [
'{{WRAPPER}} .elementor-review-box' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'box_padding',
[
'label' => esc_html__('Padding', 'elementor-addon'),
'type' => Controls_Manager::DIMENSIONS,
'size_units' => ['px', '%', 'em', 'rem'],
'default' => [
'top' => 42,
'right' => 48,
'bottom' => 42,
'left' => 48,
'unit' => 'px',
],
'selectors' => [
'{{WRAPPER}} .elementor-review-box' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'box_min_height',
[
'label' => esc_html__('Min Height', 'elementor-addon'),
'type' => Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
'px' => [
'min' => 150,
'max' => 800,
],
],
'default' => [
'size' => 360,
'unit' => 'px',
],
'selectors' => [
'{{WRAPPER}} .elementor-review-box' => 'min-height: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_group_control(
Group_Control_Border::get_type(),
[
'name' => 'box_border',
'selector' => '{{WRAPPER}} .elementor-review-box',
]
);
$this->add_group_control(
Group_Control_Box_Shadow::get_type(),
[
'name' => 'box_shadow',
'selector' => '{{WRAPPER}} .elementor-review-box',
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_stars_style',
[
'label' => esc_html__('Stars', 'elementor-addon'),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_control(
'stars_color',
[
'label' => esc_html__('Stars Color', 'elementor-addon'),
'type' => Controls_Manager::COLOR,
'default' => '#F4C214',
'selectors' => [
'{{WRAPPER}} .elementor-review-box__star' => 'color: {{VALUE}};',
'{{WRAPPER}} .elementor-review-box__star svg' => 'fill: {{VALUE}};',
],
]
);
$this->add_responsive_control(
'stars_size',
[
'label' => esc_html__('Size', 'elementor-addon'),
'type' => Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
'px' => [
'min' => 10,
'max' => 50,
],
],
'default' => [
'size' => 28,
'unit' => 'px',
],
'selectors' => [
'{{WRAPPER}} .elementor-review-box__star' => 'font-size: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
],
]
);
$this->add_responsive_control(
'stars_gap',
[
'label' => esc_html__('Gap', 'elementor-addon'),
'type' => Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
'px' => [
'min' => 0,
'max' => 20,
],
],
'default' => [
'size' => 8,
'unit' => 'px',
],
'selectors' => [
'{{WRAPPER}} .elementor-review-box__stars' => 'gap: {{SIZE}}{{UNIT}};',
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_text_style',
[
'label' => esc_html__('Review Text', 'elementor-addon'),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_control(
'review_text_color',
[
'label' => esc_html__('Color', 'elementor-addon'),
'type' => Controls_Manager::COLOR,
'default' => '#222B3A',
'selectors' => [
'{{WRAPPER}} .elementor-review-box__text' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'review_text_typography',
'selector' => '{{WRAPPER}} .elementor-review-box__text',
]
);
$this->add_responsive_control(
'review_text_spacing',
[
'label' => esc_html__('Bottom Spacing', 'elementor-addon'),
'type' => Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
'px' => [
'min' => 0,
'max' => 100,
],
],
'default' => [
'size' => 34,
'unit' => 'px',
],
'selectors' => [
'{{WRAPPER}} .elementor-review-box__content' => 'margin-bottom: {{SIZE}}{{UNIT}};',
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_author_style',
[
'label' => esc_html__('Author', 'elementor-addon'),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_control(
'author_name_color',
[
'label' => esc_html__('Name Color', 'elementor-addon'),
'type' => Controls_Manager::COLOR,
'default' => '#1F2737',
'selectors' => [
'{{WRAPPER}} .elementor-review-box__name' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'author_name_typography',
'selector' => '{{WRAPPER}} .elementor-review-box__name',
]
);
$this->add_control(
'author_location_color',
[
'label' => esc_html__('Location Color', 'elementor-addon'),
'type' => Controls_Manager::COLOR,
'default' => '#667085',
'selectors' => [
'{{WRAPPER}} .elementor-review-box__location' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'author_location_typography',
'selector' => '{{WRAPPER}} .elementor-review-box__location',
]
);
$this->add_responsive_control(
'author_gap',
[
'label' => esc_html__('Author Gap', 'elementor-addon'),
'type' => Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
'px' => [
'min' => 0,
'max' => 40,
],
],
'default' => [
'size' => 20,
'unit' => 'px',
],
'selectors' => [
'{{WRAPPER}} .elementor-review-box__footer' => 'gap: {{SIZE}}{{UNIT}};',
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_avatar_style',
[
'label' => esc_html__('Avatar Circle', 'elementor-addon'),
'tab' => Controls_Manager::TAB_STYLE,
]
);
$this->add_control(
'avatar_bg_color',
[
'label' => esc_html__('Background Color', 'elementor-addon'),
'type' => Controls_Manager::COLOR,
'default' => '#F6D6E6',
'selectors' => [
'{{WRAPPER}} .elementor-review-box__avatar' => 'background-color: {{VALUE}};',
],
]
);
$this->add_control(
'avatar_text_color',
[
'label' => esc_html__('Text Color', 'elementor-addon'),
'type' => Controls_Manager::COLOR,
'default' => '#E23D94',
'selectors' => [
'{{WRAPPER}} .elementor-review-box__avatar' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'avatar_typography',
'selector' => '{{WRAPPER}} .elementor-review-box__avatar',
]
);
$this->add_responsive_control(
'avatar_size',
[
'label' => esc_html__('Size', 'elementor-addon'),
'type' => Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
'px' => [
'min' => 40,
'max' => 160,
],
],
'default' => [
'size' => 96,
'unit' => 'px',
],
'selectors' => [
'{{WRAPPER}} .elementor-review-box__avatar' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}};',
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'section_quote_style',
[
'label' => esc_html__('Quote Icon', 'elementor-addon'),
'tab' => Controls_Manager::TAB_STYLE,
'condition' => [
'show_quote_icon' => 'yes',
],
]
);
$this->add_control(
'quote_color',
[
'label' => esc_html__('Color', 'elementor-addon'),
'type' => Controls_Manager::COLOR,
'default' => '#F6D6E6',
'selectors' => [
'{{WRAPPER}} .elementor-review-box__quote' => 'color: {{VALUE}};',
],
]
);
$this->add_responsive_control(
'quote_size',
[
'label' => esc_html__('Size', 'elementor-addon'),
'type' => Controls_Manager::SLIDER,
'size_units' => ['px'],
'range' => [
'px' => [
'min' => 20,
'max' => 120,
],
],
'default' => [
'size' => 84,
'unit' => 'px',
],
'selectors' => [
'{{WRAPPER}} .elementor-review-box__quote' => 'font-size: {{SIZE}}{{UNIT}};',
],
]
);
$this->end_controls_section();
}
protected function render_stars($rating = 5) {
$rating = max(0, min(5, absint($rating)));
for ($i = 0; $i < $rating; $i++) {
echo '<span class="elementor-review-box__star" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-star w-4 h-4 fill-yellow-400 text-yellow-400"><path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"></path></svg></span>';
}
}
protected function render() {
$settings = $this->get_settings_for_display();
$rating = isset($settings['rating']) ? absint($settings['rating']) : 5;
$review_text = !empty($settings['review_text']) ? $settings['review_text'] : '';
$author_name = !empty($settings['author_name']) ? $settings['author_name'] : '';
$author_location = !empty($settings['author_location']) ? $settings['author_location'] : '';
$author_initials = !empty($settings['author_initials']) ? $settings['author_initials'] : '';
$show_quote_icon = !empty($settings['show_quote_icon']) && $settings['show_quote_icon'] === 'yes';
?>
<div class="elementor-review-box">
<div class="elementor-review-box__top">
<?php if ($rating > 0) : ?>
<div class="elementor-review-box__stars" aria-label="<?php echo esc_attr(sprintf(__('%d out of 5 stars', 'elementor-addon'), $rating)); ?>">
<?php $this->render_stars($rating); ?>
</div>
<?php endif; ?>
<?php if ($show_quote_icon) : ?>
<div class="elementor-review-box__quote" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-quote w-12 h-12 text-primary"><path d="M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"></path><path d="M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"></path></svg>
</div>
<?php endif; ?>
</div>
<div class="elementor-review-box__content">
<div class="elementor-review-box__text"><?php echo nl2br(esc_html($review_text)); ?></div>
</div>
<div class="elementor-review-box__footer">
<?php if (!empty($author_initials)) : ?>
<div class="elementor-review-box__avatar">
<span><?php echo esc_html($author_initials); ?></span>
</div>
<?php endif; ?>
<div class="elementor-review-box__author">
<?php if (!empty($author_name)) : ?>
<div class="elementor-review-box__name"><?php echo esc_html($author_name); ?></div>
<?php endif; ?>
<?php if (!empty($author_location)) : ?>
<div class="elementor-review-box__location"><?php echo esc_html($author_location); ?></div>
<?php endif; ?>
</div>
</div>
</div>
<?php
}
}