Skip to content

Commit b780621

Browse files
author
Mizanur Rahaman
committed
Merge branch 'dashboard' of https://github.com/Wealcoder/animation-addons-for-elementor into dashboard
2 parents ac1deac + 7ef1747 commit b780621

File tree

14 files changed

+182
-22
lines changed

14 files changed

+182
-22
lines changed

animation-addons-for-elementor.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22
/**
3-
* Plugin Name: Animation Addons for Elementor - GSAP Powered Elementor Addons & Website Templates
3+
* Plugin Name: Animation Addons for Elementor
44
* Description: Animation Addons for Elementor comes with GSAP Animation Builder, Customizable Widgets, Header Footer, Single Post, Archive Page Builder, and more.
55
* Plugin URI: https://animation-addons.com/
6-
* Version: 2.3.1
6+
* Version: 2.3.2
77
* Author: Wealcoder
88
* Author URI: https://animation-addons.com/
99
* License: GPL v2 or later
1010
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
1111
* Text Domain: animation-addons-for-elementor
1212
* Domain Path: /languages
1313
* Requires Plugins: elementor
14-
* Elementor tested up to: 3.28.4
15-
* Elementor Pro tested up to: 3.28.4
14+
* Elementor tested up to: 3.29.0
15+
* Elementor Pro tested up to: 3.29.0
1616
*/
1717

1818
if ( ! defined( 'ABSPATH' ) ) {

assets/js/wcf-addons.js

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
/* global WCF_ADDONS_JS */
2+
3+
(function ($) {
4+
/**
5+
* @param $scope The Widget wrapper element as a jQuery element
6+
* @param $ The jQuery alias
7+
*/
8+
// Make sure you run this code under Elementor.
9+
$(window).on('elementor/frontend/init', function () {
10+
var Modules = elementorModules.frontend.handlers.Base;
11+
var contact_form_7 = function contact_form_7($scope) {
12+
var submit_btn = $('.wpcf7-submit', $scope);
13+
var classes = submit_btn.attr('class');
14+
classes += ' wcf-btn-default ' + $('.wcf--form-wrapper', $scope).attr('btn-hover');
15+
submit_btn.replaceWith(function () {
16+
return $('<button/>', {
17+
html: $('.btn-icon').html() + submit_btn.attr('value'),
18+
"class": classes,
19+
type: 'submit'
20+
});
21+
});
22+
};
23+
var Countdown = Modules.extend({
24+
bindEvents: function bindEvents() {
25+
this.run();
26+
},
27+
run: function run() {
28+
var _this = this;
29+
// Update the count down every 1 second
30+
var x = setInterval(function () {
31+
_this.count_down(x);
32+
}, 1000);
33+
this.count_down(x);
34+
},
35+
count_down: function count_down(x) {
36+
// Set the date we're counting down to
37+
var countDownDate = new Date(this.getElementSettings('countdown_timer_due_date')).getTime();
38+
39+
// Get today's date and time
40+
var now = new Date().getTime();
41+
42+
// Find the distance between now and the count down date
43+
var distance = countDownDate - now;
44+
45+
// Time calculations for days, hours, minutes and seconds
46+
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
47+
var hours = Math.floor(distance % (1000 * 60 * 60 * 24) / (1000 * 60 * 60));
48+
var minutes = Math.floor(distance % (1000 * 60 * 60) / (1000 * 60));
49+
var seconds = Math.floor(distance % (1000 * 60) / 1000);
50+
51+
// If the count down is over, write some text
52+
if (distance < 0) {
53+
clearInterval(x);
54+
this.findElement('.wcf--countdown').html(this.time_finish_content());
55+
} else {
56+
this.findElement('.wcf--countdown').html(this.timer_content({
57+
'days': days,
58+
'hours': hours,
59+
'minutes': minutes,
60+
'seconds': seconds
61+
}));
62+
}
63+
},
64+
timer_content: function timer_content() {
65+
var _this2 = this;
66+
var times = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
67+
if (0 === times.length) {
68+
return;
69+
}
70+
var time_content = '';
71+
$.each(times, function (index, time) {
72+
var title = _this2.getElementSettings("countdown_timer_".concat(index, "_label"));
73+
time_content += "<div class=\"timer-content timer-item-".concat(index, " \"><span class=\"time-count ").concat(index, "-count\">").concat(time, "</span><span class=\"time-title ").concat(index, "-title\">").concat(title, "</span></div>");
74+
});
75+
return time_content;
76+
},
77+
time_finish_content: function time_finish_content() {
78+
var title = this.getElementSettings('time_expire_title');
79+
var description = this.getElementSettings('time_expire_desc');
80+
var finish_content = '<div class="countdown-expire">';
81+
if (title) {
82+
finish_content += "<div class=\"countdown-expire-title\">".concat(title, "</div>");
83+
}
84+
if (description) {
85+
finish_content += "<div class=\"countdown-expire-desc\">".concat(description, "</div>");
86+
}
87+
finish_content += '</div>';
88+
return finish_content;
89+
}
90+
});
91+
elementorFrontend.hooks.addAction("frontend/element_ready/wcf--contact-form-7.default", contact_form_7);
92+
elementorFrontend.hooks.addAction('frontend/element_ready/wcf--countdown.default', function ($scope) {
93+
elementorFrontend.elementsHandler.addHandler(Countdown, {
94+
$element: $scope
95+
});
96+
});
97+
var Search = function Search($scope) {
98+
var searchWrapper = $('.search--wrapper', $scope);
99+
var toggle_open = $('.toggle--open', $scope);
100+
var toggle_close = $('.toggle--close', $scope);
101+
toggle_open.on('click', function (e) {
102+
searchWrapper.addClass('search-visible');
103+
});
104+
toggle_close.on('click', function (e) {
105+
searchWrapper.removeClass('search-visible');
106+
});
107+
$("input", $scope).focus(function () {
108+
$(".wcf-search-form", $scope).addClass('wcf-search-form--focus');
109+
});
110+
$("input", $scope).focusout(function () {
111+
$(".wcf-search-form", $scope).removeClass('wcf-search-form--focus');
112+
});
113+
};
114+
elementorFrontend.hooks.addAction('frontend/element_ready/wcf--blog--search--form.default', Search);
115+
});
116+
})(jQuery);

assets/js/wcf-addons.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/widgets/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
}
5252

5353
// Attach debounce to keyup
54-
$inputField.on('keyup', debounce(handleSearch, 500));
54+
$inputField.on('keyup input', debounce(handleSearch, 500));
5555
};
5656

5757
// Hook into Elementor

assets/js/widgets/search.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/src/js/wcf-addons.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,10 @@
44
/**
55
* @param $scope The Widget wrapper element as a jQuery element
66
* @param $ The jQuery alias
7-
*/
8-
9-
7+
*/
108
// Make sure you run this code under Elementor.
119
$(window).on('elementor/frontend/init', function () {
1210

13-
const device_width = $(window).width();
14-
const elementorBreakpoints = elementorFrontend.config.responsive.activeBreakpoints;
15-
1611
const Modules = elementorModules.frontend.handlers.Base;
1712

1813
const contact_form_7 = function ($scope) {

assets/src/js/widgets/search.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
const $inputField = $scope.find('.search-field');
77
const $resultBox = $scope.find('.aae--live-search-results');
88
const $searchWrapper = $('.search--wrapper.style-full-screen .wcf-search-container');
9-
9+
1010
// Debounce function
1111
function debounce(func, delay) {
1212
let timeout;
@@ -20,7 +20,7 @@
2020

2121
function handleSearch() {
2222
const keyword = $inputField.val().trim();
23-
23+
2424
if (keyword.length < 1) {
2525
$resultBox.hide();
2626
return;
@@ -54,7 +54,7 @@
5454
}
5555

5656
// Attach debounce to keyup
57-
$inputField.on('keyup', debounce(handleSearch, 500));
57+
$inputField.on('keyup input', debounce(handleSearch, 500));
5858
};
5959

6060
// Hook into Elementor

changelog.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11

22
== Changelog ==
33

4+
= Animation Addons for Elementor v2.3.2 – 25 may 2025 =
5+
- 🆕 **Added:** x time in meta widget
6+
- 🆕 **Added:** dependancy loaded in elementor widget for on demand asset load
7+
- 🎨 **Updated:** Dashboard Settings for Youtube , Weather, Tiktok
8+
- 🎨 **Updated:** Added ajax functionality in Search widget.
9+
10+
= Animation Addons for Elementor v2.3.1 – 15 may 2025 =
11+
- 🆕 **Added:** 5 animated business templates
12+
- 🆕 **Added:** optin popup
13+
- 🎨 **Fixed:** animation library dependancy
14+
415
= v2.2 – 06 may 2025 =
516
- ❌ **Removed:** Draggable js
617
- 🎨 **Fixed:** user data security issue

class-plugin.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function widget_scripts() {
7474
'wcf-addons-core' => [
7575
'handler' => 'wcf--addons',
7676
'src' => 'wcf-addons.min.js',
77-
'dep' => [ 'jquery', 'elementor-frontend', 'elementor-frontend-modules' ],
77+
'dep' => [ 'jquery' ],
7878
'version' => false,
7979
'arg' => true,
8080
],
@@ -441,7 +441,7 @@ public static function get_widget_style() {
441441
'countdown' => [
442442
'handler' => 'wcf--countdown',
443443
'src' => 'widgets/countdown.min.css',
444-
'dep' => [],
444+
'dep' => ['wcf-addons-core'],
445445
'version' => false,
446446
'media' => 'all',
447447
],
@@ -897,7 +897,7 @@ public function __construct() {
897897
add_action( 'elementor/elements/categories_registered', [ $this, 'widget_categories' ] );
898898

899899
// Register widget scripts
900-
add_action( 'wp_enqueue_scripts', [ $this, 'widget_scripts' ] );
900+
add_action( 'wp_enqueue_scripts', [ $this, 'widget_scripts' ],29 );
901901

902902
// Register widget style
903903
add_action( 'wp_enqueue_scripts', [ $this, 'widget_styles' ] );

config.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,21 @@
574574
'youtube_url' => '',
575575
'description' => 'Enhance your site’s usability by creating responsive, stylish, and fully customizable navigation menus.'
576576
],
577+
'mega-menu' => [
578+
'label' => 'Mega Menu',
579+
'location' => [
580+
'cTab' => 'all'
581+
],
582+
'is_active' => false,
583+
'is_pro' => true,
584+
'is_extension' => false,
585+
'is_upcoming' => true,
586+
'icon' => "wcf-icon-Nav-Menu",
587+
'demo_url' => 'https://animation-addons.com/widgets/aae-nav-menu',
588+
'doc_url' => 'https://animation-addons.com/docs/header-footer-widgets/nav-menu/',
589+
'youtube_url' => '',
590+
'description' => 'Enhance your site’s usability by creating responsive, stylish, and fully customizable navigation menus.'
591+
],
577592
]
578593
],
579594
'slider' => [
@@ -848,7 +863,7 @@
848863
'location' => [
849864
'cTab' => 'all'
850865
],
851-
'is_upcoming' => false,
866+
'is_upcoming' => true,
852867
'is_pro' => true,
853868
'is_extension' => false,
854869
'icon' => "wcf-icon-Posts",

0 commit comments

Comments
 (0)