PluginProbe
Elementor Website Builder – more than just a page builder / 3.25.4
Elementor Website Builder – more than just a page builder v3.25.4
4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 All 455 releases
← All changes | includes/widgets/testimonial.php +21 -35 4.0.7 → 3.25.4 View file →
@@ -6,9 +6,8 @@
6 6 }
7 7
8 8 use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
9 9 use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
10 -use Elementor\Modules\Promotions\Controls\Promotion_Control;
11 10
12 11 /**
13 12 * Elementor testimonial widget.
14 13 *
@@ -91,12 +90,8 @@
91 90 public function get_style_depends(): array {
92 91 return [ 'widget-testimonial' ];
93 92 }
94 93
95 - public function has_widget_inner_wrapper(): bool {
96 - return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
97 - }
98 -
99 94 /**
100 95 * Get widget upsale data.
101 96 *
102 97 * Retrieve the widget promotion data.
@@ -208,8 +203,10 @@
208 203 ],
209 204 ]
210 205 );
211 206
207 + $aside = is_rtl() ? 'right' : 'left';
208 +
212 209 $this->add_control(
213 210 'testimonial_image_position',
214 211 [
215 212 'label' => esc_html__( 'Image Position', 'elementor' ),
@@ -217,9 +214,9 @@
217 214 'default' => 'aside',
218 215 'options' => [
219 216 'aside' => [
220 217 'title' => esc_html__( 'Aside', 'elementor' ),
221 - 'icon' => 'eicon-h-align-left',
218 + 'icon' => 'eicon-h-align-' . $aside,
222 219 ],
223 220 'top' => [
224 221 'title' => esc_html__( 'Top', 'elementor' ),
225 222 'icon' => 'eicon-v-align-top',
@@ -229,9 +226,8 @@
229 226 'condition' => [
230 227 'testimonial_image[url]!' => '',
231 228 ],
232 229 'separator' => 'before',
233 - 'classes' => 'elementor-control-start-end',
234 230 'style_transfer' => true,
235 231 ]
236 232 );
237 233
@@ -241,10 +237,10 @@
241 237 'label' => esc_html__( 'Alignment', 'elementor' ),
242 238 'type' => Controls_Manager::CHOOSE,
243 239 'default' => 'center',
244 240 'options' => [
245 - 'start' => [
246 - 'title' => esc_html__( 'Start', 'elementor' ),
241 + 'left' => [
242 + 'title' => esc_html__( 'Left', 'elementor' ),
247 243 'icon' => 'eicon-text-align-left',
248 244 ],
249 245 'center' => [
250 246 'title' => esc_html__( 'Center', 'elementor' ),
@@ -249,18 +245,13 @@
249 245 'center' => [
250 246 'title' => esc_html__( 'Center', 'elementor' ),
251 247 'icon' => 'eicon-text-align-center',
252 248 ],
253 - 'end' => [
254 - 'title' => esc_html__( 'End', 'elementor' ),
249 + 'right' => [
250 + 'title' => esc_html__( 'Right', 'elementor' ),
255 251 'icon' => 'eicon-text-align-right',
256 252 ],
257 253 ],
258 - 'classes' => 'elementor-control-start-end',
259 - 'selectors_dictionary' => [
260 - 'left' => is_rtl() ? 'end' : 'start',
261 - 'right' => is_rtl() ? 'start' : 'end',
262 - ],
263 254 'selectors' => [
264 255 '{{WRAPPER}} .elementor-testimonial-wrapper' => 'text-align: {{VALUE}}',
265 256 ],
266 257 'style_transfer' => true,
@@ -499,9 +490,9 @@
499 490 if ( $has_content ) :
500 491 $this->add_render_attribute( 'testimonial_content', 'class', 'elementor-testimonial-content' );
501 492 $this->add_inline_editing_attributes( 'testimonial_content' );
502 493 ?>
503 - <div <?php $this->print_render_attribute_string( 'testimonial_content' ); ?>><?php echo wp_kses_post( $settings['testimonial_content'] ); ?></div>
494 + <div <?php $this->print_render_attribute_string( 'testimonial_content' ); ?>><?php $this->print_unescaped_setting( 'testimonial_content' ); ?></div>
504 495 <?php endif; ?>
505 496
506 497 <?php if ( $has_image || $has_name || $has_job ) : ?>
507 498 <div <?php $this->print_render_attribute_string( 'meta' ); ?>>
@@ -526,13 +517,13 @@
526 517 $this->add_inline_editing_attributes( 'testimonial_name', 'none' );
527 518
528 519 if ( ! empty( $settings['link']['url'] ) ) :
529 520 ?>
530 - <a <?php $this->print_render_attribute_string( 'testimonial_name' ); ?> <?php $this->print_render_attribute_string( 'link' ); ?>><?php echo wp_kses_post( $settings['testimonial_name'] ); ?></a>
521 + <a <?php $this->print_render_attribute_string( 'testimonial_name' ); ?> <?php $this->print_render_attribute_string( 'link' ); ?>><?php $this->print_unescaped_setting( 'testimonial_name' ); ?></a>
531 522 <?php
532 523 else :
533 524 ?>
534 - <div <?php $this->print_render_attribute_string( 'testimonial_name' ); ?>><?php echo wp_kses_post( $settings['testimonial_name'] ); ?></div>
525 + <div <?php $this->print_render_attribute_string( 'testimonial_name' ); ?>><?php $this->print_unescaped_setting( 'testimonial_name' ); ?></div>
535 526 <?php
536 527 endif;
537 528 endif; ?>
538 529 <?php
@@ -542,13 +533,13 @@
542 533 $this->add_inline_editing_attributes( 'testimonial_job', 'none' );
543 534
544 535 if ( ! empty( $settings['link']['url'] ) ) :
545 536 ?>
546 - <a <?php $this->print_render_attribute_string( 'testimonial_job' ); ?> <?php $this->print_render_attribute_string( 'link' ); ?>><?php echo wp_kses_post( $settings['testimonial_job'] ); ?></a>
537 + <a <?php $this->print_render_attribute_string( 'testimonial_job' ); ?> <?php $this->print_render_attribute_string( 'link' ); ?>><?php $this->print_unescaped_setting( 'testimonial_job' ); ?></a>
547 538 <?php
548 539 else :
549 540 ?>
550 - <div <?php $this->print_render_attribute_string( 'testimonial_job' ); ?>><?php echo wp_kses_post( $settings['testimonial_job'] ); ?></div>
541 + <div <?php $this->print_render_attribute_string( 'testimonial_job' ); ?>><?php $this->print_unescaped_setting( 'testimonial_job' ); ?></div>
551 542 <?php
552 543 endif;
553 544 endif; ?>
554 545 </div>
@@ -588,10 +579,10 @@
588 579 imageUrl = elementor.imagesManager.getImageUrl( image );
589 580 hasImage = ' elementor-has-image';
590 581
591 582 var imageHtml = '<img src="' + _.escape( imageUrl ) + '" alt="testimonial" />';
592 - if ( settings.link?.url ) {
593 - imageHtml = '<a href="' + elementor.helpers.sanitizeUrl( settings.link?.url ) + '">' + imageHtml + '</a>';
583 + if ( settings.link.url ) {
584 + imageHtml = '<a href="' + elementor.helpers.sanitizeUrl( settings.link.url ) + '">' + imageHtml + '</a>';
594 585 }
595 586 }
596 587
597 588 var testimonial_image_position = settings.testimonial_image_position ? ' elementor-testimonial-image-position-' + settings.testimonial_image_position : '';
@@ -600,19 +591,14 @@
600 591 <# if ( '' !== settings.testimonial_content ) {
601 592 view.addRenderAttribute( 'testimonial_content', {
602 593 'data-binding-type': 'content',
603 594 'data-binding-setting': 'testimonial_content',
604 - 'data-binding-config': JSON.stringify({
605 - 'testimonial_content': {
606 - editType: "text"
607 - }
608 - })
609 595 } );
610 596 view.addRenderAttribute( 'testimonial_content', 'class', 'elementor-testimonial-content' );
611 597
612 598 view.addInlineEditingAttributes( 'testimonial_content' );
613 599 #>
614 - <div {{{ view.getRenderAttributeString( 'testimonial_content' ) }}}>{{ settings.testimonial_content }}</div>
600 + <div {{{ view.getRenderAttributeString( 'testimonial_content' ) }}}>{{{ settings.testimonial_content }}}</div>
615 601 <# } #>
616 602 <div class="elementor-testimonial-meta{{ hasImage }}{{ testimonial_image_position }}">
617 603 <div class="elementor-testimonial-meta-inner">
618 604 <# if ( imageUrl ) { #>
@@ -634,15 +620,15 @@
634 620 view.addRenderAttribute( 'testimonial_name', 'class', 'elementor-testimonial-name' );
635 621
636 622 view.addInlineEditingAttributes( 'testimonial_name', 'none' );
637 623
638 - if ( settings.link?.url ) {
624 + if ( settings.link.url ) {
639 625 #>
640 - <a href="{{ elementor.helpers.sanitizeUrl( settings.link?.url ) }}" {{{ view.getRenderAttributeString( 'testimonial_name' ) }}}>{{ settings.testimonial_name }}</a>
626 + <a href="{{ elementor.helpers.sanitizeUrl( settings.link.url ) }}" {{{ view.getRenderAttributeString( 'testimonial_name' ) }}}>{{{ settings.testimonial_name }}}</a>
641 627 <#
642 628 } else {
643 629 #>
644 - <div {{{ view.getRenderAttributeString( 'testimonial_name' ) }}}>{{ settings.testimonial_name }}</div>
630 + <div {{{ view.getRenderAttributeString( 'testimonial_name' ) }}}>{{{ settings.testimonial_name }}}</div>
645 631 <#
646 632 }
647 633 }
648 634
@@ -650,15 +636,15 @@
650 636 view.addRenderAttribute( 'testimonial_job', 'class', 'elementor-testimonial-job' );
651 637
652 638 view.addInlineEditingAttributes( 'testimonial_job', 'none' );
653 639
654 - if ( settings.link?.url ) {
640 + if ( settings.link.url ) {
655 641 #>
656 - <a href="{{ elementor.helpers.sanitizeUrl( settings.link?.url ) }}" {{{ view.getRenderAttributeString( 'testimonial_job' ) }}}>{{ settings.testimonial_job }}</a>
642 + <a href="{{ elementor.helpers.sanitizeUrl( settings.link.url ) }}" {{{ view.getRenderAttributeString( 'testimonial_job' ) }}}>{{{ settings.testimonial_job }}}</a>
657 643 <#
658 644 } else {
659 645 #>
660 - <div {{{ view.getRenderAttributeString( 'testimonial_job' ) }}}>{{ settings.testimonial_job }}</div>
646 + <div {{{ view.getRenderAttributeString( 'testimonial_job' ) }}}>{{{ settings.testimonial_job }}}</div>
661 647 <#
662 648 }
663 649 }
664 650 #>