| @@ -208,8 +208,10 @@ | ||
| 208 | 208 | ], |
| 209 | 209 | ] |
| 210 | 210 | ); |
| 211 | 211 | |
| 212 | + $aside = is_rtl() ? 'right' : 'left'; | |
| 213 | + | |
| 212 | 214 | $this->add_control( |
| 213 | 215 | 'testimonial_image_position', |
| 214 | 216 | [ |
| 215 | 217 | 'label' => esc_html__( 'Image Position', 'elementor' ), |
| @@ -217,9 +219,9 @@ | ||
| 217 | 219 | 'default' => 'aside', |
| 218 | 220 | 'options' => [ |
| 219 | 221 | 'aside' => [ |
| 220 | 222 | 'title' => esc_html__( 'Aside', 'elementor' ), |
| 221 | - 'icon' => 'eicon-h-align-left', | |
| 223 | + 'icon' => 'eicon-h-align-' . $aside, | |
| 222 | 224 | ], |
| 223 | 225 | 'top' => [ |
| 224 | 226 | 'title' => esc_html__( 'Top', 'elementor' ), |
| 225 | 227 | 'icon' => 'eicon-v-align-top', |
| @@ -229,9 +231,8 @@ | ||
| 229 | 231 | 'condition' => [ |
| 230 | 232 | 'testimonial_image[url]!' => '', |
| 231 | 233 | ], |
| 232 | 234 | 'separator' => 'before', |
| 233 | - 'classes' => 'elementor-control-start-end', | |
| 234 | 235 | 'style_transfer' => true, |
| 235 | 236 | ] |
| 236 | 237 | ); |
| 237 | 238 | |
| @@ -241,10 +242,10 @@ | ||
| 241 | 242 | 'label' => esc_html__( 'Alignment', 'elementor' ), |
| 242 | 243 | 'type' => Controls_Manager::CHOOSE, |
| 243 | 244 | 'default' => 'center', |
| 244 | 245 | 'options' => [ |
| 245 | - 'start' => [ | |
| 246 | - 'title' => esc_html__( 'Start', 'elementor' ), | |
| 246 | + 'left' => [ | |
| 247 | + 'title' => esc_html__( 'Left', 'elementor' ), | |
| 247 | 248 | 'icon' => 'eicon-text-align-left', |
| 248 | 249 | ], |
| 249 | 250 | 'center' => [ |
| 250 | 251 | 'title' => esc_html__( 'Center', 'elementor' ), |
| @@ -249,18 +250,13 @@ | ||
| 249 | 250 | 'center' => [ |
| 250 | 251 | 'title' => esc_html__( 'Center', 'elementor' ), |
| 251 | 252 | 'icon' => 'eicon-text-align-center', |
| 252 | 253 | ], |
| 253 | - 'end' => [ | |
| 254 | - 'title' => esc_html__( 'End', 'elementor' ), | |
| 254 | + 'right' => [ | |
| 255 | + 'title' => esc_html__( 'Right', 'elementor' ), | |
| 255 | 256 | 'icon' => 'eicon-text-align-right', |
| 256 | 257 | ], |
| 257 | 258 | ], |
| 258 | - 'classes' => 'elementor-control-start-end', | |
| 259 | - 'selectors_dictionary' => [ | |
| 260 | - 'left' => is_rtl() ? 'end' : 'start', | |
| 261 | - 'right' => is_rtl() ? 'start' : 'end', | |
| 262 | - ], | |
| 263 | 259 | 'selectors' => [ |
| 264 | 260 | '{{WRAPPER}} .elementor-testimonial-wrapper' => 'text-align: {{VALUE}}', |
| 265 | 261 | ], |
| 266 | 262 | 'style_transfer' => true, |
| @@ -567,34 +563,8 @@ | ||
| 567 | 563 | * |
| 568 | 564 | * @since 2.9.0 |
| 569 | 565 | * @access protected |
| 570 | 566 | */ |
| 571 | - public function render_markdown(): string { | |
| 572 | - $settings = $this->get_settings_for_display(); | |
| 573 | - | |
| 574 | - $content = Utils::html_to_plain_text( $settings['testimonial_content'] ?? '' ); | |
| 575 | - $name = Utils::html_to_plain_text( $settings['testimonial_name'] ?? '' ); | |
| 576 | - $job = Utils::html_to_plain_text( $settings['testimonial_job'] ?? '' ); | |
| 577 | - | |
| 578 | - if ( empty( $content ) && empty( $name ) ) { | |
| 579 | - return ''; | |
| 580 | - } | |
| 581 | - | |
| 582 | - $md = ''; | |
| 583 | - | |
| 584 | - if ( ! empty( $content ) ) { | |
| 585 | - $md = '> "' . $content . '"'; | |
| 586 | - } | |
| 587 | - | |
| 588 | - $attribution = array_filter( [ $name, $job ] ); | |
| 589 | - | |
| 590 | - if ( ! empty( $attribution ) ) { | |
| 591 | - $md .= "\n>\n> -- " . implode( ', ', $attribution ); | |
| 592 | - } | |
| 593 | - | |
| 594 | - return $md; | |
| 595 | - } | |
| 596 | - | |
| 597 | 567 | protected function content_template() { |
| 598 | 568 | ?> |
| 599 | 569 | <# |
| 600 | 570 | if ( '' === settings.testimonial_content && '' === settings.testimonial_image.url && '' === settings.testimonial_name && '' === settings.testimonial_job ) { |
| @@ -614,10 +584,10 @@ | ||
| 614 | 584 | imageUrl = elementor.imagesManager.getImageUrl( image ); |
| 615 | 585 | hasImage = ' elementor-has-image'; |
| 616 | 586 | |
| 617 | 587 | var imageHtml = '<img src="' + _.escape( imageUrl ) + '" alt="testimonial" />'; |
| 618 | - if ( settings.link?.url ) { | |
| 619 | - imageHtml = '<a href="' + elementor.helpers.sanitizeUrl( settings.link?.url ) + '">' + imageHtml + '</a>'; | |
| 588 | + if ( settings.link.url ) { | |
| 589 | + imageHtml = '<a href="' + elementor.helpers.sanitizeUrl( settings.link.url ) + '">' + imageHtml + '</a>'; | |
| 620 | 590 | } |
| 621 | 591 | } |
| 622 | 592 | |
| 623 | 593 | var testimonial_image_position = settings.testimonial_image_position ? ' elementor-testimonial-image-position-' + settings.testimonial_image_position : ''; |
| @@ -660,11 +630,11 @@ | ||
| 660 | 630 | view.addRenderAttribute( 'testimonial_name', 'class', 'elementor-testimonial-name' ); |
| 661 | 631 | |
| 662 | 632 | view.addInlineEditingAttributes( 'testimonial_name', 'none' ); |
| 663 | 633 | |
| 664 | - if ( settings.link?.url ) { | |
| 634 | + if ( settings.link.url ) { | |
| 665 | 635 | #> |
| 666 | - <a href="{{ elementor.helpers.sanitizeUrl( settings.link?.url ) }}" {{{ view.getRenderAttributeString( 'testimonial_name' ) }}}>{{ settings.testimonial_name }}</a> | |
| 636 | + <a href="{{ elementor.helpers.sanitizeUrl( settings.link.url ) }}" {{{ view.getRenderAttributeString( 'testimonial_name' ) }}}>{{ settings.testimonial_name }}</a> | |
| 667 | 637 | <# |
| 668 | 638 | } else { |
| 669 | 639 | #> |
| 670 | 640 | <div {{{ view.getRenderAttributeString( 'testimonial_name' ) }}}>{{ settings.testimonial_name }}</div> |
| @@ -676,11 +646,11 @@ | ||
| 676 | 646 | view.addRenderAttribute( 'testimonial_job', 'class', 'elementor-testimonial-job' ); |
| 677 | 647 | |
| 678 | 648 | view.addInlineEditingAttributes( 'testimonial_job', 'none' ); |
| 679 | 649 | |
| 680 | - if ( settings.link?.url ) { | |
| 650 | + if ( settings.link.url ) { | |
| 681 | 651 | #> |
| 682 | - <a href="{{ elementor.helpers.sanitizeUrl( settings.link?.url ) }}" {{{ view.getRenderAttributeString( 'testimonial_job' ) }}}>{{ settings.testimonial_job }}</a> | |
| 652 | + <a href="{{ elementor.helpers.sanitizeUrl( settings.link.url ) }}" {{{ view.getRenderAttributeString( 'testimonial_job' ) }}}>{{ settings.testimonial_job }}</a> | |
| 683 | 653 | <# |
| 684 | 654 | } else { |
| 685 | 655 | #> |
| 686 | 656 | <div {{{ view.getRenderAttributeString( 'testimonial_job' ) }}}>{{ settings.testimonial_job }}</div> |