PluginProbe
Elementor Website Builder – more than just a page builder / 3.23.0-dev3
Elementor Website Builder – more than just a page builder v3.23.0-dev3
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 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
← All changes | includes/widgets/testimonial.php +21 -49 4.0.73.23.0-dev3 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 *
@@ -78,26 +77,8 @@
78 77 return false;
79 78 }
80 79
81 80 /**
82 - * Get style dependencies.
83 - *
84 - * Retrieve the list of style dependencies the widget requires.
85 - *
86 - * @since 3.24.0
87 - * @access public
88 - *
89 - * @return array Widget style dependencies.
90 - */
91 - public function get_style_depends(): array {
92 - return [ 'widget-testimonial' ];
93 - }
94 -
95 - public function has_widget_inner_wrapper(): bool {
96 - return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
97 - }
98 -
99 - /**
100 81 * Get widget upsale data.
101 82 *
102 83 * Retrieve the widget promotion data.
103 84 *
@@ -208,8 +189,10 @@
208 189 ],
209 190 ]
210 191 );
211 192
193 + $aside = is_rtl() ? 'right' : 'left';
194 +
212 195 $this->add_control(
213 196 'testimonial_image_position',
214 197 [
215 198 'label' => esc_html__( 'Image Position', 'elementor' ),
@@ -217,9 +200,9 @@
217 200 'default' => 'aside',
218 201 'options' => [
219 202 'aside' => [
220 203 'title' => esc_html__( 'Aside', 'elementor' ),
221 - 'icon' => 'eicon-h-align-left',
204 + 'icon' => 'eicon-h-align-' . $aside,
222 205 ],
223 206 'top' => [
224 207 'title' => esc_html__( 'Top', 'elementor' ),
225 208 'icon' => 'eicon-v-align-top',
@@ -229,9 +212,8 @@
229 212 'condition' => [
230 213 'testimonial_image[url]!' => '',
231 214 ],
232 215 'separator' => 'before',
233 - 'classes' => 'elementor-control-start-end',
234 216 'style_transfer' => true,
235 217 ]
236 218 );
237 219
@@ -241,10 +223,10 @@
241 223 'label' => esc_html__( 'Alignment', 'elementor' ),
242 224 'type' => Controls_Manager::CHOOSE,
243 225 'default' => 'center',
244 226 'options' => [
245 - 'start' => [
246 - 'title' => esc_html__( 'Start', 'elementor' ),
227 + 'left' => [
228 + 'title' => esc_html__( 'Left', 'elementor' ),
247 229 'icon' => 'eicon-text-align-left',
248 230 ],
249 231 'center' => [
250 232 'title' => esc_html__( 'Center', 'elementor' ),
@@ -249,18 +231,13 @@
249 231 'center' => [
250 232 'title' => esc_html__( 'Center', 'elementor' ),
251 233 'icon' => 'eicon-text-align-center',
252 234 ],
253 - 'end' => [
254 - 'title' => esc_html__( 'End', 'elementor' ),
235 + 'right' => [
236 + 'title' => esc_html__( 'Right', 'elementor' ),
255 237 'icon' => 'eicon-text-align-right',
256 238 ],
257 239 ],
258 - 'classes' => 'elementor-control-start-end',
259 - 'selectors_dictionary' => [
260 - 'left' => is_rtl() ? 'end' : 'start',
261 - 'right' => is_rtl() ? 'start' : 'end',
262 - ],
263 240 'selectors' => [
264 241 '{{WRAPPER}} .elementor-testimonial-wrapper' => 'text-align: {{VALUE}}',
265 242 ],
266 243 'style_transfer' => true,
@@ -499,9 +476,9 @@
499 476 if ( $has_content ) :
500 477 $this->add_render_attribute( 'testimonial_content', 'class', 'elementor-testimonial-content' );
501 478 $this->add_inline_editing_attributes( 'testimonial_content' );
502 479 ?>
503 - <div <?php $this->print_render_attribute_string( 'testimonial_content' ); ?>><?php echo wp_kses_post( $settings['testimonial_content'] ); ?></div>
480 + <div <?php $this->print_render_attribute_string( 'testimonial_content' ); ?>><?php $this->print_unescaped_setting( 'testimonial_content' ); ?></div>
504 481 <?php endif; ?>
505 482
506 483 <?php if ( $has_image || $has_name || $has_job ) : ?>
507 484 <div <?php $this->print_render_attribute_string( 'meta' ); ?>>
@@ -526,13 +503,13 @@
526 503 $this->add_inline_editing_attributes( 'testimonial_name', 'none' );
527 504
528 505 if ( ! empty( $settings['link']['url'] ) ) :
529 506 ?>
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>
507 + <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 508 <?php
532 509 else :
533 510 ?>
534 - <div <?php $this->print_render_attribute_string( 'testimonial_name' ); ?>><?php echo wp_kses_post( $settings['testimonial_name'] ); ?></div>
511 + <div <?php $this->print_render_attribute_string( 'testimonial_name' ); ?>><?php $this->print_unescaped_setting( 'testimonial_name' ); ?></div>
535 512 <?php
536 513 endif;
537 514 endif; ?>
538 515 <?php
@@ -542,13 +519,13 @@
542 519 $this->add_inline_editing_attributes( 'testimonial_job', 'none' );
543 520
544 521 if ( ! empty( $settings['link']['url'] ) ) :
545 522 ?>
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>
523 + <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 524 <?php
548 525 else :
549 526 ?>
550 - <div <?php $this->print_render_attribute_string( 'testimonial_job' ); ?>><?php echo wp_kses_post( $settings['testimonial_job'] ); ?></div>
527 + <div <?php $this->print_render_attribute_string( 'testimonial_job' ); ?>><?php $this->print_unescaped_setting( 'testimonial_job' ); ?></div>
551 528 <?php
552 529 endif;
553 530 endif; ?>
554 531 </div>
@@ -588,10 +565,10 @@
588 565 imageUrl = elementor.imagesManager.getImageUrl( image );
589 566 hasImage = ' elementor-has-image';
590 567
591 568 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>';
569 + if ( settings.link.url ) {
570 + imageHtml = '<a href="' + _.escape( settings.link.url ) + '">' + imageHtml + '</a>';
594 571 }
595 572 }
596 573
597 574 var testimonial_image_position = settings.testimonial_image_position ? ' elementor-testimonial-image-position-' + settings.testimonial_image_position : '';
@@ -600,19 +577,14 @@
600 577 <# if ( '' !== settings.testimonial_content ) {
601 578 view.addRenderAttribute( 'testimonial_content', {
602 579 'data-binding-type': 'content',
603 580 'data-binding-setting': 'testimonial_content',
604 - 'data-binding-config': JSON.stringify({
605 - 'testimonial_content': {
606 - editType: "text"
607 - }
608 - })
609 581 } );
610 582 view.addRenderAttribute( 'testimonial_content', 'class', 'elementor-testimonial-content' );
611 583
612 584 view.addInlineEditingAttributes( 'testimonial_content' );
613 585 #>
614 - <div {{{ view.getRenderAttributeString( 'testimonial_content' ) }}}>{{ settings.testimonial_content }}</div>
586 + <div {{{ view.getRenderAttributeString( 'testimonial_content' ) }}}>{{{ settings.testimonial_content }}}</div>
615 587 <# } #>
616 588 <div class="elementor-testimonial-meta{{ hasImage }}{{ testimonial_image_position }}">
617 589 <div class="elementor-testimonial-meta-inner">
618 590 <# if ( imageUrl ) { #>
@@ -634,15 +606,15 @@
634 606 view.addRenderAttribute( 'testimonial_name', 'class', 'elementor-testimonial-name' );
635 607
636 608 view.addInlineEditingAttributes( 'testimonial_name', 'none' );
637 609
638 - if ( settings.link?.url ) {
610 + if ( settings.link.url ) {
639 611 #>
640 - <a href="{{ elementor.helpers.sanitizeUrl( settings.link?.url ) }}" {{{ view.getRenderAttributeString( 'testimonial_name' ) }}}>{{ settings.testimonial_name }}</a>
612 + <a href="{{ settings.link.url }}" {{{ view.getRenderAttributeString( 'testimonial_name' ) }}}>{{{ settings.testimonial_name }}}</a>
641 613 <#
642 614 } else {
643 615 #>
644 - <div {{{ view.getRenderAttributeString( 'testimonial_name' ) }}}>{{ settings.testimonial_name }}</div>
616 + <div {{{ view.getRenderAttributeString( 'testimonial_name' ) }}}>{{{ settings.testimonial_name }}}</div>
645 617 <#
646 618 }
647 619 }
648 620
@@ -650,15 +622,15 @@
650 622 view.addRenderAttribute( 'testimonial_job', 'class', 'elementor-testimonial-job' );
651 623
652 624 view.addInlineEditingAttributes( 'testimonial_job', 'none' );
653 625
654 - if ( settings.link?.url ) {
626 + if ( settings.link.url ) {
655 627 #>
656 - <a href="{{ elementor.helpers.sanitizeUrl( settings.link?.url ) }}" {{{ view.getRenderAttributeString( 'testimonial_job' ) }}}>{{ settings.testimonial_job }}</a>
628 + <a href="{{ settings.link.url }}" {{{ view.getRenderAttributeString( 'testimonial_job' ) }}}>{{{ settings.testimonial_job }}}</a>
657 629 <#
658 630 } else {
659 631 #>
660 - <div {{{ view.getRenderAttributeString( 'testimonial_job' ) }}}>{{ settings.testimonial_job }}</div>
632 + <div {{{ view.getRenderAttributeString( 'testimonial_job' ) }}}>{{{ settings.testimonial_job }}}</div>
661 633 <#
662 634 }
663 635 }
664 636 #>