| @@ -80,16 +80,8 @@ | ||
| 80 | 80 | public function get_keywords() { |
| 81 | 81 | return [ 'audio', 'player', 'soundcloud', 'embed' ]; |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - protected function is_dynamic_content(): bool { | |
| 85 | - return false; | |
| 86 | - } | |
| 87 | - | |
| 88 | - public function has_widget_inner_wrapper(): bool { | |
| 89 | - return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' ); | |
| 90 | - } | |
| 91 | - | |
| 92 | 84 | /** |
| 93 | 85 | * Register audio widget controls. |
| 94 | 86 | * |
| 95 | 87 | * Adds different input fields to allow the user to change and customize the widget settings. |
| @@ -252,9 +244,19 @@ | ||
| 252 | 244 | 'type' => Controls_Manager::COLOR, |
| 253 | 245 | ] |
| 254 | 246 | ); |
| 255 | 247 | |
| 248 | + $this->add_control( | |
| 249 | + 'view', | |
| 250 | + [ | |
| 251 | + 'label' => esc_html__( 'View', 'elementor' ), | |
| 252 | + 'type' => Controls_Manager::HIDDEN, | |
| 253 | + 'default' => 'soundcloud', | |
| 254 | + ] | |
| 255 | + ); | |
| 256 | + | |
| 256 | 257 | $this->end_controls_section(); |
| 258 | + | |
| 257 | 259 | } |
| 258 | 260 | |
| 259 | 261 | /** |
| 260 | 262 | * Render audio widget output on the frontend. |
| @@ -341,14 +343,5 @@ | ||
| 341 | 343 | * @since 2.9.0 |
| 342 | 344 | * @access protected |
| 343 | 345 | */ |
| 344 | 346 | protected function content_template() {} |
| 345 | - | |
| 346 | - public function render_markdown(): string { | |
| 347 | - $settings = $this->get_settings_for_display(); | |
| 348 | - $url = $settings['link']['url'] ?? ''; | |
| 349 | - if ( empty( $url ) ) { | |
| 350 | - return ''; | |
| 351 | - } | |
| 352 | - return '[Audio](' . esc_url( $url ) . ')'; | |
| 353 | - } | |
| 354 | 347 | } |