| @@ -1,9 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace Elementor; |
| 3 | 3 | |
| 4 | 4 | use Elementor\Includes\Widgets\Traits\Button_Trait; |
| 5 | -use Elementor\Modules\Promotions\Controls\Promotion_Control; | |
| 6 | 5 | |
| 7 | 6 | if ( ! defined( 'ABSPATH' ) ) { |
| 8 | 7 | exit; // Exit if accessed directly. |
| 9 | 8 | } |
| @@ -77,38 +76,8 @@ | ||
| 77 | 76 | public function get_categories() { |
| 78 | 77 | return [ 'basic' ]; |
| 79 | 78 | } |
| 80 | 79 | |
| 81 | - protected function is_dynamic_content(): bool { | |
| 82 | - return false; | |
| 83 | - } | |
| 84 | - | |
| 85 | - public function has_widget_inner_wrapper(): bool { | |
| 86 | - return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' ); | |
| 87 | - } | |
| 88 | - | |
| 89 | - /** | |
| 90 | - * Get widget upsale data. | |
| 91 | - * | |
| 92 | - * Retrieve the widget promotion data. | |
| 93 | - * | |
| 94 | - * @since 3.19.0 | |
| 95 | - * @access protected | |
| 96 | - * | |
| 97 | - * @return array Widget promotion data. | |
| 98 | - */ | |
| 99 | - protected function get_upsale_data() { | |
| 100 | - return [ | |
| 101 | - 'condition' => ! Utils::has_pro(), | |
| 102 | - 'image' => esc_url( ELEMENTOR_ASSETS_URL . 'images/go-pro.svg' ), | |
| 103 | - 'image_alt' => esc_attr__( 'Upgrade', 'elementor' ), | |
| 104 | - 'title' => esc_html__( 'Convert visitors into customers', 'elementor' ), | |
| 105 | - 'description' => esc_html__( 'Get the Call to Action widget and grow your toolbox with Elementor Pro.', 'elementor' ), | |
| 106 | - 'upgrade_url' => esc_url( 'https://go.elementor.com/go-pro-button-widget/' ), | |
| 107 | - 'upgrade_text' => esc_html__( 'Upgrade Now', 'elementor' ), | |
| 108 | - ]; | |
| 109 | - } | |
| 110 | - | |
| 111 | 80 | protected function register_controls() { |
| 112 | 81 | $this->start_controls_section( |
| 113 | 82 | 'section_button', |
| 114 | 83 | [ |
| @@ -144,20 +113,12 @@ | ||
| 144 | 113 | protected function render() { |
| 145 | 114 | $this->render_button(); |
| 146 | 115 | } |
| 147 | 116 | |
| 148 | - public function render_markdown(): string { | |
| 149 | - $settings = $this->get_settings_for_display(); | |
| 150 | - | |
| 151 | - $text = Utils::html_to_plain_text( $settings['text'] ?? '' ); | |
| 152 | - | |
| 153 | - if ( empty( $text ) ) { | |
| 154 | - return ''; | |
| 155 | - } | |
| 156 | - | |
| 157 | - if ( ! empty( $settings['link']['url'] ) ) { | |
| 158 | - return '[' . $text . '](' . esc_url( $settings['link']['url'] ) . ')'; | |
| 159 | - } | |
| 160 | - | |
| 161 | - return '**' . $text . '**'; | |
| 117 | + protected function get_upsale_data() { | |
| 118 | + return [ | |
| 119 | + 'title' => esc_html__( 'Convert visitors into customers', 'elementor' ), | |
| 120 | + 'description' => esc_html__( 'Get the Call to Action widget and grow your toolbox with Elementor Pro.', 'elementor' ), | |
| 121 | + 'upgrade_url' => esc_url( 'https://go.elementor.com/go-pro-button-widget/' ), | |
| 122 | + ]; | |
| 162 | 123 | } |
| 163 | 124 | } |