PluginProbe
Elementor Website Builder – more than just a page builder / 4.3.0-beta3
Elementor Website Builder – more than just a page builder v4.3.0-beta3
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 +26 -0 4.0.84.3.0-beta3 View file →
@@ -567,8 +567,34 @@
567 567 *
568 568 * @since 2.9.0
569 569 * @access protected
570 570 */
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 +
571 597 protected function content_template() {
572 598 ?>
573 599 <#
574 600 if ( '' === settings.testimonial_content && '' === settings.testimonial_image.url && '' === settings.testimonial_name && '' === settings.testimonial_job ) {