PluginProbe
Elementor Website Builder – more than just a page builder / 3.25.2
Elementor Website Builder – more than just a page builder v3.25.2
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 4.0.7 All 451 releases
← All changes | includes/widgets/video.php +8 -33 4.2.03.25.2 View file →
@@ -1,9 +1,8 @@
1 1 <?php
2 2 namespace Elementor;
3 3
4 4 use Elementor\Modules\DynamicTags\Module as TagsModule;
5 -use Elementor\Modules\Promotions\Controls\Promotion_Control;
6 5
7 6 if ( ! defined( 'ABSPATH' ) ) {
8 7 exit; // Exit if accessed directly.
9 8 }
@@ -106,12 +105,8 @@
106 105 public function get_style_depends(): array {
107 106 return [ 'widget-video' ];
108 107 }
109 108
110 - public function has_widget_inner_wrapper(): bool {
111 - return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
112 - }
113 -
114 109 /**
115 110 * Register video widget controls.
116 111 *
117 112 * Adds different input fields to allow the user to change and customize the widget settings.
@@ -432,11 +427,11 @@
432 427 ]
433 428 );
434 429
435 430 $this->add_control(
436 - 'cc_load_policy',
431 + 'modestbranding',
437 432 [
438 - 'label' => esc_html__( 'Captions', 'elementor' ),
433 + 'label' => esc_html__( 'Modest Branding', 'elementor' ),
439 434 'type' => Controls_Manager::SWITCHER,
440 435 'condition' => [
441 436 'video_type' => [ 'youtube' ],
442 437 'controls' => 'yes',
@@ -957,9 +952,9 @@
957 952 'default' => [
958 953 'unit' => '%',
959 954 ],
960 955 // 'selectors' => [
961 - // '(desktop+)#elementor-lightbox-{{ID}} .elementor-video-container' => 'width: {{SIZE}}{{UNIT}};',
956 + // '(desktop+)#elementor-lightbox-{{ID}} .elementor-video-container' => 'width: {{SIZE}}{{UNIT}};',
962 957 // ],
963 958 'condition' => [
964 959 'lightbox_video_width!' => '',
965 960 'lightbox_content_position!' => '',
@@ -978,9 +973,9 @@
978 973 '' => esc_html__( 'Center', 'elementor' ),
979 974 'top' => esc_html__( 'Top', 'elementor' ),
980 975 ],
981 976 // 'selectors' => [
982 - // '#elementor-lightbox-{{ID}} .elementor-video-container' => '{{VALUE}}; transform: translateX(-50%);',
977 + // '#elementor-lightbox-{{ID}} .elementor-video-container' => '{{VALUE}}; transform: translateX(-50%);',
983 978 // ],
984 979 'selectors_dictionary' => [
985 980 'top' => 'top: 60px',
986 981 ],
@@ -1048,9 +1043,9 @@
1048 1043
1049 1044 if ( $is_static_render_mode ) {
1050 1045 $video_html = Embed::get_embed_thumbnail_html( $video_url, $post_id );
1051 1046 // YouTube API requires a different markup which was set above.
1052 - } elseif ( 'youtube' !== $settings['video_type'] ) {
1047 + } else if ( 'youtube' !== $settings['video_type'] ) {
1053 1048 $video_html = Embed::get_embed_html( $video_url, $embed_params, $embed_options );
1054 1049 }
1055 1050 }
1056 1051
@@ -1134,8 +1129,9 @@
1134 1129 ];
1135 1130 }
1136 1131 Icons_Manager::render_icon( $settings['play_icon'], [ 'aria-hidden' => 'true' ] );
1137 1132 ?>
1133 + <span class="elementor-screen-only"><?php $this->print_a11y_text( $settings['image_overlay'] ); ?></span>
1138 1134 </div>
1139 1135 <?php endif; ?>
1140 1136 </div>
1141 1137 <?php } ?>
@@ -1193,9 +1189,9 @@
1193 1189 'loop',
1194 1190 'controls',
1195 1191 'mute',
1196 1192 'rel',
1197 - 'cc_load_policy',
1193 + 'modestbranding',
1198 1194 ];
1199 1195
1200 1196 if ( $settings['loop'] ) {
1201 1197 $video_properties = Embed::get_video_properties( $settings['youtube_url'] );
@@ -1332,8 +1328,9 @@
1332 1328 return $video_params;
1333 1329 }
1334 1330
1335 1331 /**
1332 + * @param bool $from_media
1336 1333 *
1337 1334 * @return string
1338 1335 * @since 2.1.0
1339 1336 * @access private
@@ -1411,28 +1408,6 @@
1411 1408 /* Sometimes the video url is base64, therefore we use `esc_attr` in `src`. */
1412 1409 ?>
1413 1410 <video class="elementor-video" src="<?php echo esc_attr( $video_url ); ?>" <?php Utils::print_html_attributes( $video_params ); ?>></video>
1414 1411 <?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 1412 }
1438 1413 }