From b2b33e10cc940918511f2d10021948531fe48480 Mon Sep 17 00:00:00 2001 From: soufiane Date: Tue, 24 Sep 2024 12:42:50 +0200 Subject: [PATCH] wait #7094 @0:10 --- .../cube/src/Elementor/Widgets/HeroBlock.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) 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(); ?>
-- 2.39.5