| @@ -115,30 +115,8 @@ | ||
| 115 | 115 | * Register video widget controls. |
| 116 | 116 | * |
| 117 | 117 | * Adds different input fields to allow the user to change and customize the widget settings. |
| 118 | 118 | * |
| 119 | - * @since 3.19.0 | |
| 120 | - * @access protected | |
| 121 | - * | |
| 122 | - * @return array Widget promotion data. | |
| 123 | - */ | |
| 124 | - protected function get_upsale_data() { | |
| 125 | - return [ | |
| 126 | - 'condition' => ! Utils::has_pro(), | |
| 127 | - 'image' => esc_url( ELEMENTOR_ASSETS_URL . 'images/go-pro.svg' ), | |
| 128 | - 'image_alt' => esc_attr__( 'Upgrade', 'elementor' ), | |
| 129 | - 'title' => esc_html__( "Grab your visitors' attention", 'elementor' ), | |
| 130 | - 'description' => esc_html__( 'Get the Video Playlist widget and grow your toolbox with Elementor Pro.', 'elementor' ), | |
| 131 | - 'upgrade_url' => esc_url( 'https://go.elementor.com/go-pro-video-widget/' ), | |
| 132 | - 'upgrade_text' => esc_html__( 'Upgrade Now', 'elementor' ), | |
| 133 | - ]; | |
| 134 | - } | |
| 135 | - | |
| 136 | - /** | |
| 137 | - * Register video widget controls. | |
| 138 | - * | |
| 139 | - * Adds different input fields to allow the user to change and customize the widget settings. | |
| 140 | - * | |
| 141 | 119 | * @since 3.1.0 |
| 142 | 120 | * @access protected |
| 143 | 121 | */ |
| 144 | 122 | protected function register_controls() { |
| @@ -432,11 +410,11 @@ | ||
| 432 | 410 | ] |
| 433 | 411 | ); |
| 434 | 412 | |
| 435 | 413 | $this->add_control( |
| 436 | - 'cc_load_policy', | |
| 414 | + 'modestbranding', | |
| 437 | 415 | [ |
| 438 | - 'label' => esc_html__( 'Captions', 'elementor' ), | |
| 416 | + 'label' => esc_html__( 'Modest Branding', 'elementor' ), | |
| 439 | 417 | 'type' => Controls_Manager::SWITCHER, |
| 440 | 418 | 'condition' => [ |
| 441 | 419 | 'video_type' => [ 'youtube' ], |
| 442 | 420 | 'controls' => 'yes', |
| @@ -626,8 +604,18 @@ | ||
| 626 | 604 | ], |
| 627 | 605 | ] |
| 628 | 606 | ); |
| 629 | 607 | |
| 608 | + if ( ! Utils::has_pro() ) { | |
| 609 | + $this->add_control( | |
| 610 | + Utils::VIDEO_PLAYLIST . '_promotion', | |
| 611 | + [ | |
| 612 | + 'label' => esc_html__( 'Video Playlist widget', 'elementor' ), | |
| 613 | + 'type' => Promotion_Control::TYPE, | |
| 614 | + ] | |
| 615 | + ); | |
| 616 | + } | |
| 617 | + | |
| 630 | 618 | $this->end_controls_section(); |
| 631 | 619 | |
| 632 | 620 | $this->start_controls_section( |
| 633 | 621 | 'section_image_overlay', |
| @@ -957,9 +945,9 @@ | ||
| 957 | 945 | 'default' => [ |
| 958 | 946 | 'unit' => '%', |
| 959 | 947 | ], |
| 960 | 948 | // 'selectors' => [ |
| 961 | - // '(desktop+)#elementor-lightbox-{{ID}} .elementor-video-container' => 'width: {{SIZE}}{{UNIT}};', | |
| 949 | + // '(desktop+)#elementor-lightbox-{{ID}} .elementor-video-container' => 'width: {{SIZE}}{{UNIT}};', | |
| 962 | 950 | // ], |
| 963 | 951 | 'condition' => [ |
| 964 | 952 | 'lightbox_video_width!' => '', |
| 965 | 953 | 'lightbox_content_position!' => '', |
| @@ -978,9 +966,9 @@ | ||
| 978 | 966 | '' => esc_html__( 'Center', 'elementor' ), |
| 979 | 967 | 'top' => esc_html__( 'Top', 'elementor' ), |
| 980 | 968 | ], |
| 981 | 969 | // 'selectors' => [ |
| 982 | - // '#elementor-lightbox-{{ID}} .elementor-video-container' => '{{VALUE}}; transform: translateX(-50%);', | |
| 970 | + // '#elementor-lightbox-{{ID}} .elementor-video-container' => '{{VALUE}}; transform: translateX(-50%);', | |
| 983 | 971 | // ], |
| 984 | 972 | 'selectors_dictionary' => [ |
| 985 | 973 | 'top' => 'top: 60px', |
| 986 | 974 | ], |
| @@ -1048,9 +1036,9 @@ | ||
| 1048 | 1036 | |
| 1049 | 1037 | if ( $is_static_render_mode ) { |
| 1050 | 1038 | $video_html = Embed::get_embed_thumbnail_html( $video_url, $post_id ); |
| 1051 | 1039 | // YouTube API requires a different markup which was set above. |
| 1052 | - } elseif ( 'youtube' !== $settings['video_type'] ) { | |
| 1040 | + } else if ( 'youtube' !== $settings['video_type'] ) { | |
| 1053 | 1041 | $video_html = Embed::get_embed_html( $video_url, $embed_params, $embed_options ); |
| 1054 | 1042 | } |
| 1055 | 1043 | } |
| 1056 | 1044 | |
| @@ -1193,9 +1181,9 @@ | ||
| 1193 | 1181 | 'loop', |
| 1194 | 1182 | 'controls', |
| 1195 | 1183 | 'mute', |
| 1196 | 1184 | 'rel', |
| 1197 | - 'cc_load_policy', | |
| 1185 | + 'modestbranding', | |
| 1198 | 1186 | ]; |
| 1199 | 1187 | |
| 1200 | 1188 | if ( $settings['loop'] ) { |
| 1201 | 1189 | $video_properties = Embed::get_video_properties( $settings['youtube_url'] ); |
| @@ -1332,8 +1320,9 @@ | ||
| 1332 | 1320 | return $video_params; |
| 1333 | 1321 | } |
| 1334 | 1322 | |
| 1335 | 1323 | /** |
| 1324 | + * @param bool $from_media | |
| 1336 | 1325 | * |
| 1337 | 1326 | * @return string |
| 1338 | 1327 | * @since 2.1.0 |
| 1339 | 1328 | * @access private |