| @@ -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() { |
| @@ -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', |
| @@ -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 | |