| @@ -1,8 +1,7 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace Elementor; |
| 3 | 3 | |
| 4 | -use Elementor\Core\Frontend\Widget_Content_Render_Mode; | |
| 5 | 4 | use Elementor\Core\Utils\Promotions\Filtered_Promotions_Manager; |
| 6 | 5 | use Elementor\Utils; |
| 7 | 6 | |
| 8 | 7 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -380,9 +379,9 @@ | ||
| 380 | 379 | 'categories' => $this->get_categories(), |
| 381 | 380 | 'html_wrapper_class' => $this->get_html_wrapper_class(), |
| 382 | 381 | 'show_in_panel' => $this->show_in_panel(), |
| 383 | 382 | 'hide_on_search' => $this->hide_on_search(), |
| 384 | - 'upsale_data' => null, | |
| 383 | + 'upsale_data' => Plugin::$instance->experiments->is_feature_active( 'e_panel_promotions' ) ? null : $this->get_upsale_data(), | |
| 385 | 384 | 'is_dynamic_content' => $this->is_dynamic_content(), |
| 386 | 385 | 'has_widget_inner_wrapper' => $this->has_widget_inner_wrapper(), |
| 387 | 386 | ]; |
| 388 | 387 | |
| @@ -624,9 +623,9 @@ | ||
| 624 | 623 | * @since 1.0.0 |
| 625 | 624 | * |
| 626 | 625 | * @param Widget_Base $this The current widget. |
| 627 | 626 | */ |
| 628 | - do_action( 'elementor/widget/before_render_content', $this, [ 'mode' => Widget_Content_Render_Mode::NORMAL ] ); | |
| 627 | + do_action( 'elementor/widget/before_render_content', $this ); | |
| 629 | 628 | |
| 630 | 629 | ob_start(); |
| 631 | 630 | |
| 632 | 631 | $skin = $this->get_current_skin(); |
| @@ -659,9 +658,9 @@ | ||
| 659 | 658 | * |
| 660 | 659 | * @param string $widget_content The content of the widget. |
| 661 | 660 | * @param Widget_Base $this The widget. |
| 662 | 661 | */ |
| 663 | - $widget_content = apply_filters( 'elementor/widget/render_content', $widget_content, $this, [ 'mode' => Widget_Content_Render_Mode::NORMAL ] ); | |
| 662 | + $widget_content = apply_filters( 'elementor/widget/render_content', $widget_content, $this ); | |
| 664 | 663 | Utils::print_unescaped_internal_string( $widget_content ); |
| 665 | 664 | ?> |
| 666 | 665 | <?php if ( $this->has_widget_inner_wrapper() ) : ?> |
| 667 | 666 | </div> |
| @@ -698,40 +697,13 @@ | ||
| 698 | 697 | $this->render_content(); |
| 699 | 698 | } |
| 700 | 699 | |
| 701 | 700 | public function render_markdown(): string { |
| 702 | - $content = $this->get_render_content_for_markdown(); | |
| 703 | - | |
| 704 | - if ( '' === $content ) { | |
| 705 | - return ''; | |
| 706 | - } | |
| 707 | - | |
| 708 | - return \Elementor\Modules\MarkdownRender\Html_To_Markdown::convert( $content ); | |
| 709 | - } | |
| 710 | - | |
| 711 | - protected function get_render_content_for_markdown(): string { | |
| 712 | - $render_args = [ 'mode' => Widget_Content_Render_Mode::MARKDOWN ]; | |
| 713 | - | |
| 714 | - do_action( 'elementor/widget/before_render_content', $this, $render_args ); | |
| 715 | - | |
| 716 | 701 | ob_start(); |
| 702 | + $this->render_content(); | |
| 703 | + $html = ob_get_clean(); | |
| 717 | 704 | |
| 718 | - $skin = $this->get_current_skin(); | |
| 719 | - | |
| 720 | - if ( $skin ) { | |
| 721 | - $skin->set_parent( $this ); | |
| 722 | - $skin->render_by_mode(); | |
| 723 | - } else { | |
| 724 | - $this->render_by_mode(); | |
| 725 | - } | |
| 726 | - | |
| 727 | - $widget_content = ob_get_clean(); | |
| 728 | - | |
| 729 | - if ( '' === $widget_content ) { | |
| 730 | - return ''; | |
| 731 | - } | |
| 732 | - | |
| 733 | - return apply_filters( 'elementor/widget/render_content', $widget_content, $this, $render_args ); | |
| 705 | + return wp_strip_all_tags( $html ); | |
| 734 | 706 | } |
| 735 | 707 | |
| 736 | 708 | /** |
| 737 | 709 | * Before widget rendering. |