From: soufiane Date: Tue, 24 Sep 2024 10:42:50 +0000 (+0200) Subject: wait #7094 @0:10 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=b2b33e10cc940918511f2d10021948531fe48480;p=c6-wordpress.git wait #7094 @0:10 --- diff --git a/wp-content/mu-plugins/cube/src/Elementor/Widgets/HeroBlock.php b/wp-content/mu-plugins/cube/src/Elementor/Widgets/HeroBlock.php index f62565b..16209a8 100644 --- a/wp-content/mu-plugins/cube/src/Elementor/Widgets/HeroBlock.php +++ b/wp-content/mu-plugins/cube/src/Elementor/Widgets/HeroBlock.php @@ -130,15 +130,14 @@ class HeroBlock extends Widget_Base { ); $this->add_control( - 'url_video', + 'video', [ - 'label' => __('Video embed url', 'cube'), - 'type' => Controls_Manager::URL, - 'default' => [ - 'url' => '', - 'is_external' => false, - ], - 'show_external' => false + 'label' => esc_html__( 'Has video', 'textdomain' ), + 'type' => \Elementor\Controls_Manager::SWITCHER, + 'label_on' => esc_html__( 'Yes', 'textdomain' ), + 'label_off' => esc_html__( 'No', 'textdomain' ), + 'return_value' => 'yes', + 'default' => 'no', ] ); @@ -160,7 +159,7 @@ class HeroBlock extends Widget_Base { $body_image = $this->get_settings('body_image'); $cta_text = $this->get_settings('cta_text'); $cta_link = $this->get_settings('cta_link'); - $url_video = $this->get_settings('url_video'); + $video = $this->get_settings('video'); if ( ! empty( $cta_link['url'] ) ) { $this->add_render_attribute( 'cta_text', 'href', $cta_link['url'] ); @@ -214,7 +213,7 @@ class HeroBlock extends Widget_Base { 'hero-block-body-image']); ?> - +
toHtml(); ?>