| @@ -1048,9 +1048,9 @@ | ||
| 1048 | 1048 | |
| 1049 | 1049 | if ( $is_static_render_mode ) { |
| 1050 | 1050 | $video_html = Embed::get_embed_thumbnail_html( $video_url, $post_id ); |
| 1051 | 1051 | // YouTube API requires a different markup which was set above. |
| 1052 | - } elseif ( 'youtube' !== $settings['video_type'] ) { | |
| 1052 | + } else if ( 'youtube' !== $settings['video_type'] ) { | |
| 1053 | 1053 | $video_html = Embed::get_embed_html( $video_url, $embed_params, $embed_options ); |
| 1054 | 1054 | } |
| 1055 | 1055 | } |
| 1056 | 1056 | |
| @@ -1411,28 +1411,6 @@ | ||
| 1411 | 1411 | /* Sometimes the video url is base64, therefore we use `esc_attr` in `src`. */ |
| 1412 | 1412 | ?> |
| 1413 | 1413 | <video class="elementor-video" src="<?php echo esc_attr( $video_url ); ?>" <?php Utils::print_html_attributes( $video_params ); ?>></video> |
| 1414 | 1414 | <?php |
| 1415 | - } | |
| 1416 | - | |
| 1417 | - public function render_markdown(): string { | |
| 1418 | - $settings = $this->get_settings_for_display(); | |
| 1419 | - $video_type = $settings['video_type'] ?? 'youtube'; | |
| 1420 | - $url = ''; | |
| 1421 | - | |
| 1422 | - if ( 'hosted' === $video_type ) { | |
| 1423 | - if ( ! empty( $settings['insert_url'] ) ) { | |
| 1424 | - $url = $settings['external_url']['url'] ?? ''; | |
| 1425 | - } else { | |
| 1426 | - $url = $settings['hosted_url']['url'] ?? ''; | |
| 1427 | - } | |
| 1428 | - } else { | |
| 1429 | - $url = $settings[ $video_type . '_url' ] ?? ''; | |
| 1430 | - } | |
| 1431 | - | |
| 1432 | - if ( empty( $url ) ) { | |
| 1433 | - return ''; | |
| 1434 | - } | |
| 1435 | - | |
| 1436 | - return '[Video](' . esc_url( $url ) . ')'; | |
| 1437 | 1415 | } |
| 1438 | 1416 | } |