From 118f0627778880d4f0f44ab22f3baecf35605ab9 Mon Sep 17 00:00:00 2001 From: Rami Yushuvaev <92088692+rami-elementor@users.noreply.github.com> Date: Sun, 17 Mar 2024 12:59:08 -0700 Subject: [PATCH] Replace var with const (#259) --- src/controls/complex-example.md | 4 ++-- src/editor-controls/control-hover-animation.md | 6 +++++- src/editor-controls/control-icons.md | 2 +- src/editor-controls/group-control-image-size.md | 4 ++-- src/widgets/advanced-example.md | 4 ++-- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/controls/complex-example.md b/src/controls/complex-example.md index 6e846901..91310315 100644 --- a/src/controls/complex-example.md +++ b/src/controls/complex-example.md @@ -187,9 +187,9 @@ class Elementor_EmojiOneArea_Control extends \Elementor\Base_Data_Control { ```js window.addEventListener( 'elementor/init', () => { - var emojioneareaItemView = elementor.modules.controls.BaseData.extend({ + const emojioneareaItemView = elementor.modules.controls.BaseData.extend({ onReady() { - var self = this, + const self = this, options = _.extend({ events: { change: () => self.saveValue(), diff --git a/src/editor-controls/control-hover-animation.md b/src/editor-controls/control-hover-animation.md index d43142ff..83421cc6 100644 --- a/src/editor-controls/control-hover-animation.md +++ b/src/editor-controls/control-hover-animation.md @@ -103,9 +103,11 @@ class Elementor_Test_Widget extends \Elementor\Widget_Base { $settings = $this->get_settings_for_display(); $elementClass = 'container'; + if ( $settings['hover_animation'] ) { $elementClass .= ' elementor-animation-' . $settings['hover_animation']; } + $this->add_render_attribute( 'wrapper', 'class', $elementClass ); ?>