Version Description
- New: Added Version Control tab to plugin settings including Version Rollback option and an option to enable beta versions updates.
- Tweak: Added Custom/Existing page link option for Premium Dual Heading Widget.
- Tweak: Changed Addons icons hover color.
Download this release
Release Info
Developer | leap13 |
Plugin | Premium Addons for Elementor |
Version | 2.1.3 |
Comparing to | |
See all releases |
Code changes from version 2.1.2 to 2.1.3
- admin/assets/admin.css +75 -3
- admin/assets/admin.js +22 -1
- admin/assets/js/dialog/dialog.js +830 -0
- admin/assets/pa-elements-font/css/pa-elements.css +3 -0
- admin/settings-page.php +63 -17
- assets/images/premium-addons-logo.png +0 -0
- assets/js/lib/jquery.waypoints.js +502 -0
- includes/beta-testers.php +59 -0
- includes/maintenance.php +29 -0
- includes/rollback.php +80 -0
- premium-addons-for-elementor.php +15 -8
- readme.txt +6 -0
- widgets/premium-blog.php +1 -1
- widgets/premium-carousel.php +1 -1
- widgets/premium-countdown.php +1 -1
- widgets/premium-dual-header.php +74 -0
- widgets/premium-image-button.php +1 -1
- widgets/premium-imageseparator.php +1 -1
- widgets/premium-modalbox.php +1 -1
- widgets/premium-person.php +1 -1
- widgets/premium-pricing-table.php +1 -1
- widgets/premium-testimonials.php +1 -1
- widgets/premium-title.php +1 -1
- widgets/premium-videobox.php +1 -1
admin/assets/admin.css
CHANGED
@@ -190,7 +190,7 @@ li.ui-state-active a{
|
|
190 |
left: 0px;
|
191 |
bottom: 1.1px;
|
192 |
background: radial-gradient(farthest-corner at 14px 0px,
|
193 |
-
rgb(240,240,240) 50%, rgb(202,202,202) 100%)
|
194 |
-webkit-transition: .4s;
|
195 |
transition: .4s;
|
196 |
padding: 0;
|
@@ -233,10 +233,12 @@ input:checked + .slider:before {
|
|
233 |
display: inline-block;
|
234 |
margin: 0;
|
235 |
}
|
236 |
-
.pa-api-disable-title label
|
|
|
237 |
margin-right: 15px;
|
238 |
}
|
239 |
-
.pa-api-disable-title span
|
|
|
240 |
font-weight: normal;
|
241 |
}
|
242 |
.pa-maps-api-notice {
|
@@ -249,3 +251,73 @@ input:checked + .slider:before {
|
|
249 |
width: 400px;
|
250 |
margin-left: 30px;
|
251 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
left: 0px;
|
191 |
bottom: 1.1px;
|
192 |
background: radial-gradient(farthest-corner at 14px 0px,
|
193 |
+
rgb(240,240,240) 50%, rgb(202,202,202) 100%);
|
194 |
-webkit-transition: .4s;
|
195 |
transition: .4s;
|
196 |
padding: 0;
|
233 |
display: inline-block;
|
234 |
margin: 0;
|
235 |
}
|
236 |
+
.pa-api-disable-title label,
|
237 |
+
.pa-is-beta label{
|
238 |
margin-right: 15px;
|
239 |
}
|
240 |
+
.pa-api-disable-title span,
|
241 |
+
.pa-is-beta span{
|
242 |
font-weight: normal;
|
243 |
}
|
244 |
.pa-maps-api-notice {
|
251 |
width: 400px;
|
252 |
margin-left: 30px;
|
253 |
}
|
254 |
+
|
255 |
+
#pa-maintenance {
|
256 |
+
margin-top: 30px;
|
257 |
+
}
|
258 |
+
.pa-beta-table tr {
|
259 |
+
text-align: left;
|
260 |
+
}
|
261 |
+
.pa-roll-back,
|
262 |
+
.pa-beta-test{
|
263 |
+
text-align: left;
|
264 |
+
font-size: 20px;
|
265 |
+
font-weight: normal;
|
266 |
+
margin-top: 15px;
|
267 |
+
margin-bottom: 10px;
|
268 |
+
}
|
269 |
+
.pa-beta-test {
|
270 |
+
margin-top: 0;
|
271 |
+
}
|
272 |
+
.pa-roll-back-span,
|
273 |
+
.pa-beta-test-span{
|
274 |
+
line-height: 22px;
|
275 |
+
color: #444;
|
276 |
+
font-size: 13px;
|
277 |
+
margin: 0;
|
278 |
+
font-weight: normal;
|
279 |
+
}
|
280 |
+
.pa-roll-row,
|
281 |
+
.pa-beta-row{
|
282 |
+
float: left;
|
283 |
+
}
|
284 |
+
.pa-beta-row{
|
285 |
+
margin-top: 13px;
|
286 |
+
}
|
287 |
+
.pa-roll-row th,
|
288 |
+
.pa-beta-row th{
|
289 |
+
vertical-align: top;
|
290 |
+
text-align: left;
|
291 |
+
padding: 20px 10px 20px 0;
|
292 |
+
width: 200px;
|
293 |
+
line-height: 1.3;
|
294 |
+
}
|
295 |
+
.pa-roll-row td{
|
296 |
+
padding: 15px 10px;
|
297 |
+
}
|
298 |
+
.pa-beta-row td{
|
299 |
+
padding: 22px 10px;
|
300 |
+
}
|
301 |
+
.pa-roll-row .pa-rollback-button {
|
302 |
+
box-shadow: 0 1px 0 #ccc;
|
303 |
+
color: #555;
|
304 |
+
border: 1px solid #ccc;
|
305 |
+
background: #f7f7f7;
|
306 |
+
vertical-align: top;
|
307 |
+
margin: 0;
|
308 |
+
padding: 0 10px 1px;
|
309 |
+
}
|
310 |
+
.pa-roll-row .pa-rollback-button:hover {
|
311 |
+
background: #fafafa;
|
312 |
+
border-color: #999;
|
313 |
+
color: #23282d;
|
314 |
+
}
|
315 |
+
.pa-roll-row .pa-roll-desc{
|
316 |
+
font-style: italic;
|
317 |
+
color: red;
|
318 |
+
margin-top: 4px;
|
319 |
+
}
|
320 |
+
.pa-beta-row .pa-beta-desc{
|
321 |
+
font-style: italic;
|
322 |
+
margin-top: 4px;
|
323 |
+
}
|
admin/assets/admin.js
CHANGED
@@ -18,7 +18,6 @@
|
|
18 |
}
|
19 |
});
|
20 |
|
21 |
-
|
22 |
$( 'form#pa-settings' ).on( 'submit', function(e) {
|
23 |
e.preventDefault();
|
24 |
$.ajax( {
|
@@ -45,4 +44,26 @@
|
|
45 |
|
46 |
} );
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
} )(jQuery);
|
18 |
}
|
19 |
});
|
20 |
|
|
|
21 |
$( 'form#pa-settings' ).on( 'submit', function(e) {
|
22 |
e.preventDefault();
|
23 |
$.ajax( {
|
44 |
|
45 |
} );
|
46 |
|
47 |
+
|
48 |
+
$( '.pa-rollback-button' ).on( 'click', function( event ) {
|
49 |
+
event.preventDefault();
|
50 |
+
|
51 |
+
var $this = $( this ),
|
52 |
+
dialogsManager = new DialogsManager.Instance();
|
53 |
+
|
54 |
+
dialogsManager.createWidget( 'confirm', {
|
55 |
+
headerMessage: premiumRollBackConfirm.i18n.rollback_to_previous_version,
|
56 |
+
message: premiumRollBackConfirm.i18n.rollback_confirm,
|
57 |
+
strings: {
|
58 |
+
cancel: premiumRollBackConfirm.i18n.cancel,
|
59 |
+
confirm: premiumRollBackConfirm.i18n.yes,
|
60 |
+
},
|
61 |
+
onConfirm: function() {
|
62 |
+
$this.addClass( 'loading' );
|
63 |
+
|
64 |
+
location.href = $this.attr( 'href' );
|
65 |
+
}
|
66 |
+
} ).show();
|
67 |
+
} );
|
68 |
+
|
69 |
} )(jQuery);
|
admin/assets/js/dialog/dialog.js
ADDED
@@ -0,0 +1,830 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Dialogs Manager v4.2.1
|
3 |
+
* https://github.com/kobizz/dialogs-manager
|
4 |
+
*
|
5 |
+
* Copyright Kobi Zaltzberg
|
6 |
+
* Released under the MIT license
|
7 |
+
* https://github.com/kobizz/dialogs-manager/blob/master/LICENSE.txt
|
8 |
+
*/
|
9 |
+
|
10 |
+
(function ($, global) {
|
11 |
+
'use strict';
|
12 |
+
|
13 |
+
/*
|
14 |
+
* Dialog Manager
|
15 |
+
*/
|
16 |
+
var DialogsManager = {
|
17 |
+
widgetsTypes: {},
|
18 |
+
createWidgetType: function (typeName, properties, Parent) {
|
19 |
+
|
20 |
+
if (!Parent) {
|
21 |
+
Parent = this.Widget;
|
22 |
+
}
|
23 |
+
|
24 |
+
var WidgetType = function () {
|
25 |
+
|
26 |
+
Parent.apply(this, arguments);
|
27 |
+
};
|
28 |
+
|
29 |
+
var prototype = WidgetType.prototype = new Parent(typeName);
|
30 |
+
|
31 |
+
prototype.types = prototype.types.concat([typeName]);
|
32 |
+
|
33 |
+
$.extend(prototype, properties);
|
34 |
+
|
35 |
+
prototype.constructor = WidgetType;
|
36 |
+
|
37 |
+
WidgetType.extend = function (typeName, properties) {
|
38 |
+
|
39 |
+
return DialogsManager.createWidgetType(typeName, properties, WidgetType);
|
40 |
+
};
|
41 |
+
|
42 |
+
return WidgetType;
|
43 |
+
},
|
44 |
+
addWidgetType: function (typeName, properties, Parent) {
|
45 |
+
|
46 |
+
if (properties && properties.prototype instanceof this.Widget) {
|
47 |
+
return this.widgetsTypes[typeName] = properties;
|
48 |
+
}
|
49 |
+
|
50 |
+
return this.widgetsTypes[typeName] = this.createWidgetType(typeName, properties, Parent);
|
51 |
+
},
|
52 |
+
getWidgetType: function (widgetType) {
|
53 |
+
|
54 |
+
return this.widgetsTypes[widgetType];
|
55 |
+
}
|
56 |
+
};
|
57 |
+
|
58 |
+
/*
|
59 |
+
* Dialog Manager instances constructor
|
60 |
+
*/
|
61 |
+
DialogsManager.Instance = function () {
|
62 |
+
|
63 |
+
var self = this,
|
64 |
+
elements = {},
|
65 |
+
settings = {};
|
66 |
+
|
67 |
+
var initElements = function () {
|
68 |
+
|
69 |
+
elements.body = $('body');
|
70 |
+
};
|
71 |
+
|
72 |
+
var initSettings = function (options) {
|
73 |
+
|
74 |
+
var defaultSettings = {
|
75 |
+
classPrefix: 'dialog',
|
76 |
+
effects: {
|
77 |
+
show: 'fadeIn',
|
78 |
+
hide: 'fadeOut'
|
79 |
+
}
|
80 |
+
};
|
81 |
+
|
82 |
+
$.extend(settings, defaultSettings, options);
|
83 |
+
};
|
84 |
+
|
85 |
+
this.createWidget = function (widgetType, properties) {
|
86 |
+
|
87 |
+
var WidgetTypeConstructor = DialogsManager.getWidgetType(widgetType),
|
88 |
+
widget = new WidgetTypeConstructor(widgetType);
|
89 |
+
|
90 |
+
properties = properties || {};
|
91 |
+
|
92 |
+
widget.init(self, properties);
|
93 |
+
|
94 |
+
widget.setMessage(properties.message);
|
95 |
+
|
96 |
+
return widget;
|
97 |
+
};
|
98 |
+
|
99 |
+
this.getSettings = function (property) {
|
100 |
+
|
101 |
+
if (property) {
|
102 |
+
return settings[property];
|
103 |
+
}
|
104 |
+
|
105 |
+
return Object.create(settings);
|
106 |
+
};
|
107 |
+
|
108 |
+
this.init = function (settings) {
|
109 |
+
|
110 |
+
initSettings(settings);
|
111 |
+
|
112 |
+
initElements();
|
113 |
+
|
114 |
+
return self;
|
115 |
+
};
|
116 |
+
|
117 |
+
self.init();
|
118 |
+
};
|
119 |
+
|
120 |
+
/*
|
121 |
+
* Widget types constructor
|
122 |
+
*/
|
123 |
+
DialogsManager.Widget = function (widgetName) {
|
124 |
+
|
125 |
+
var self = this,
|
126 |
+
settings = {},
|
127 |
+
events = {},
|
128 |
+
elements = {},
|
129 |
+
hideTimeOut = 0,
|
130 |
+
baseClosureMethods = ['refreshPosition'];
|
131 |
+
|
132 |
+
var bindEvents = function () {
|
133 |
+
|
134 |
+
elements.window.on('keyup', onWindowKeyUp);
|
135 |
+
|
136 |
+
if (settings.hide.onOutsideClick) {
|
137 |
+
elements.window[0].addEventListener('click', hideOnOutsideClick, true);
|
138 |
+
}
|
139 |
+
|
140 |
+
if (settings.hide.onClick || settings.hide.onBackgroundClick) {
|
141 |
+
elements.widget.on('click', hideOnClick);
|
142 |
+
}
|
143 |
+
|
144 |
+
if (settings.position.autoRefresh) {
|
145 |
+
elements.window.on('resize', self.refreshPosition);
|
146 |
+
}
|
147 |
+
};
|
148 |
+
|
149 |
+
var callEffect = function (intent, params) {
|
150 |
+
|
151 |
+
var effect = settings.effects[intent],
|
152 |
+
$widget = elements.widget;
|
153 |
+
|
154 |
+
if ($.isFunction(effect)) {
|
155 |
+
effect.apply($widget, params);
|
156 |
+
}
|
157 |
+
else {
|
158 |
+
|
159 |
+
if ($widget[effect]) {
|
160 |
+
$widget[effect].apply($widget, params);
|
161 |
+
}
|
162 |
+
else {
|
163 |
+
throw 'Reference Error: The effect ' + effect + ' not found';
|
164 |
+
}
|
165 |
+
}
|
166 |
+
};
|
167 |
+
|
168 |
+
var ensureClosureMethods = function() {
|
169 |
+
|
170 |
+
var closureMethodsNames = baseClosureMethods.concat(self.getClosureMethods());
|
171 |
+
|
172 |
+
$.each(closureMethodsNames, function () {
|
173 |
+
|
174 |
+
var methodName = this,
|
175 |
+
oldMethod = self[methodName];
|
176 |
+
|
177 |
+
self[methodName] = function () {
|
178 |
+
|
179 |
+
oldMethod.apply(self, arguments);
|
180 |
+
};
|
181 |
+
});
|
182 |
+
};
|
183 |
+
|
184 |
+
var initElements = function () {
|
185 |
+
|
186 |
+
self.addElement('widget');
|
187 |
+
|
188 |
+
self.addElement('message');
|
189 |
+
|
190 |
+
self.addElement('window', window);
|
191 |
+
|
192 |
+
self.addElement('container', settings.container);
|
193 |
+
|
194 |
+
var id = self.getSettings('id');
|
195 |
+
|
196 |
+
if (id) {
|
197 |
+
self.setID(id);
|
198 |
+
}
|
199 |
+
|
200 |
+
var classes = [];
|
201 |
+
|
202 |
+
$.each(self.types, function() {
|
203 |
+
classes.push(settings.classes.globalPrefix + '-type-' + this);
|
204 |
+
});
|
205 |
+
|
206 |
+
classes.push(self.getSettings('className'));
|
207 |
+
|
208 |
+
self.getElements('widget').addClass(classes.join(' '));
|
209 |
+
};
|
210 |
+
|
211 |
+
var initSettings = function (parent, userSettings) {
|
212 |
+
|
213 |
+
var parentSettings = $.extend(true, {}, parent.getSettings());
|
214 |
+
|
215 |
+
settings = {
|
216 |
+
effects: parentSettings.effects,
|
217 |
+
classes: {
|
218 |
+
globalPrefix: parentSettings.classPrefix,
|
219 |
+
prefix: parentSettings.classPrefix + '-' + widgetName
|
220 |
+
},
|
221 |
+
selectors: {
|
222 |
+
preventClose: '.' + parentSettings.classPrefix + '-prevent-close'
|
223 |
+
},
|
224 |
+
container: 'body',
|
225 |
+
position: {
|
226 |
+
element: 'widget',
|
227 |
+
my: 'center',
|
228 |
+
at: 'center',
|
229 |
+
of: 'container',
|
230 |
+
enable: true,
|
231 |
+
autoRefresh: false
|
232 |
+
},
|
233 |
+
hide: {
|
234 |
+
auto: false,
|
235 |
+
autoDelay: 5000,
|
236 |
+
onClick: false,
|
237 |
+
onOutsideClick: true,
|
238 |
+
onBackgroundClick: true
|
239 |
+
}
|
240 |
+
};
|
241 |
+
|
242 |
+
$.extend(true, settings, self.getDefaultSettings(), userSettings);
|
243 |
+
|
244 |
+
initSettingsEvents();
|
245 |
+
};
|
246 |
+
|
247 |
+
var initSettingsEvents = function () {
|
248 |
+
|
249 |
+
$.each(settings, function (settingKey) {
|
250 |
+
|
251 |
+
var eventName = settingKey.match(/^on([A-Z].*)/);
|
252 |
+
|
253 |
+
if (!eventName) {
|
254 |
+
return;
|
255 |
+
}
|
256 |
+
|
257 |
+
eventName = eventName[1].charAt(0).toLowerCase() + eventName[1].slice(1);
|
258 |
+
|
259 |
+
self.on(eventName, this);
|
260 |
+
});
|
261 |
+
};
|
262 |
+
|
263 |
+
var normalizeClassName = function (name) {
|
264 |
+
|
265 |
+
return name.replace(/([a-z])([A-Z])/g, function () {
|
266 |
+
|
267 |
+
return arguments[1] + '-' + arguments[2].toLowerCase();
|
268 |
+
});
|
269 |
+
};
|
270 |
+
|
271 |
+
var hideOnClick = function(event) {
|
272 |
+
|
273 |
+
if (settings.hide.onClick) {
|
274 |
+
|
275 |
+
if ($(event.target).closest(settings.selectors.preventClose).length) {
|
276 |
+
return;
|
277 |
+
}
|
278 |
+
} else if (event.target !== this) {
|
279 |
+
return;
|
280 |
+
}
|
281 |
+
|
282 |
+
self.hide();
|
283 |
+
};
|
284 |
+
|
285 |
+
var hideOnOutsideClick = function(event) {
|
286 |
+
if ($(event.target).closest(elements.widget).length) {
|
287 |
+
return;
|
288 |
+
}
|
289 |
+
|
290 |
+
self.hide();
|
291 |
+
};
|
292 |
+
|
293 |
+
var onWindowKeyUp = function(event) {
|
294 |
+
var ESC_KEY = 27,
|
295 |
+
keyCode = event.which;
|
296 |
+
|
297 |
+
if (ESC_KEY === keyCode) {
|
298 |
+
self.hide();
|
299 |
+
}
|
300 |
+
};
|
301 |
+
|
302 |
+
var unbindEvents = function() {
|
303 |
+
|
304 |
+
elements.window.off('keyup', onWindowKeyUp);
|
305 |
+
|
306 |
+
if (settings.hide.onOutsideClick) {
|
307 |
+
elements.window[0].removeEventListener('click', hideOnOutsideClick, true);
|
308 |
+
}
|
309 |
+
|
310 |
+
if (settings.hide.onClick || settings.hide.onBackgroundClick) {
|
311 |
+
elements.widget.off('click', hideOnClick);
|
312 |
+
}
|
313 |
+
|
314 |
+
if (settings.position.autoRefresh) {
|
315 |
+
elements.window.off('resize', self.refreshPosition);
|
316 |
+
}
|
317 |
+
};
|
318 |
+
|
319 |
+
this.addElement = function (name, element, type) {
|
320 |
+
|
321 |
+
var $newElement = elements[name] = $(element || '<div>'),
|
322 |
+
normalizedName = normalizeClassName(name),
|
323 |
+
className = [];
|
324 |
+
|
325 |
+
if (type) {
|
326 |
+
className.push(settings.classes.globalPrefix + '-' + type);
|
327 |
+
}
|
328 |
+
|
329 |
+
className.push(settings.classes.globalPrefix + '-' + normalizedName);
|
330 |
+
|
331 |
+
className.push(settings.classes.prefix + '-' + normalizedName);
|
332 |
+
|
333 |
+
$newElement.addClass(className.join(' '));
|
334 |
+
|
335 |
+
return $newElement;
|
336 |
+
};
|
337 |
+
|
338 |
+
this.getSettings = function (setting) {
|
339 |
+
|
340 |
+
var copy = Object.create(settings);
|
341 |
+
|
342 |
+
if (setting) {
|
343 |
+
return copy[setting];
|
344 |
+
}
|
345 |
+
|
346 |
+
return copy;
|
347 |
+
};
|
348 |
+
|
349 |
+
this.init = function (parent, properties) {
|
350 |
+
|
351 |
+
if (!(parent instanceof DialogsManager.Instance)) {
|
352 |
+
throw 'The ' + self.widgetName + ' must to be initialized from an instance of DialogsManager.Instance';
|
353 |
+
}
|
354 |
+
|
355 |
+
ensureClosureMethods();
|
356 |
+
|
357 |
+
self.trigger('init', properties);
|
358 |
+
|
359 |
+
initSettings(parent, properties);
|
360 |
+
|
361 |
+
initElements();
|
362 |
+
|
363 |
+
self.buildWidget();
|
364 |
+
|
365 |
+
if (self.attachEvents) {
|
366 |
+
self.attachEvents();
|
367 |
+
}
|
368 |
+
|
369 |
+
self.trigger('ready');
|
370 |
+
|
371 |
+
return self;
|
372 |
+
};
|
373 |
+
|
374 |
+
this.getElements = function (item) {
|
375 |
+
|
376 |
+
return item ? elements[item] : elements;
|
377 |
+
};
|
378 |
+
|
379 |
+
this.hide = function () {
|
380 |
+
|
381 |
+
clearTimeout(hideTimeOut);
|
382 |
+
|
383 |
+
callEffect('hide', arguments);
|
384 |
+
|
385 |
+
unbindEvents();
|
386 |
+
|
387 |
+
self.trigger('hide');
|
388 |
+
|
389 |
+
return self;
|
390 |
+
};
|
391 |
+
|
392 |
+
this.isVisible = function() {
|
393 |
+
|
394 |
+
return elements.widget.is(':visible');
|
395 |
+
};
|
396 |
+
|
397 |
+
this.on = function (eventName, callback) {
|
398 |
+
|
399 |
+
if ('object' === typeof eventName) {
|
400 |
+
$.each(eventName, function(singleEventName) {
|
401 |
+
self.on(singleEventName, this);
|
402 |
+
});
|
403 |
+
|
404 |
+
return self;
|
405 |
+
}
|
406 |
+
|
407 |
+
var eventNames = eventName.split(' ');
|
408 |
+
|
409 |
+
eventNames.forEach(function(singleEventName) {
|
410 |
+
if (! events[singleEventName]) {
|
411 |
+
events[singleEventName] = [];
|
412 |
+
}
|
413 |
+
|
414 |
+
events[singleEventName].push(callback);
|
415 |
+
});
|
416 |
+
|
417 |
+
return self;
|
418 |
+
};
|
419 |
+
|
420 |
+
this.setMessage = function (message) {
|
421 |
+
|
422 |
+
elements.message.html(message);
|
423 |
+
|
424 |
+
return self;
|
425 |
+
};
|
426 |
+
|
427 |
+
this.setID = function (id) {
|
428 |
+
|
429 |
+
self.getElements('widget').attr('id', id);
|
430 |
+
|
431 |
+
return self;
|
432 |
+
};
|
433 |
+
|
434 |
+
this.setSettings = function(key, value) {
|
435 |
+
|
436 |
+
if ('object' === typeof value) {
|
437 |
+
$.extend(true, settings[key], value);
|
438 |
+
} else {
|
439 |
+
settings[key] = value;
|
440 |
+
}
|
441 |
+
|
442 |
+
return self;
|
443 |
+
};
|
444 |
+
|
445 |
+
this.show = function () {
|
446 |
+
|
447 |
+
clearTimeout(hideTimeOut);
|
448 |
+
|
449 |
+
elements.widget.appendTo(elements.container).hide();
|
450 |
+
|
451 |
+
callEffect('show', arguments);
|
452 |
+
|
453 |
+
self.refreshPosition();
|
454 |
+
|
455 |
+
if (settings.hide.auto) {
|
456 |
+
hideTimeOut = setTimeout(self.hide, settings.hide.autoDelay);
|
457 |
+
}
|
458 |
+
|
459 |
+
bindEvents();
|
460 |
+
|
461 |
+
self.trigger('show');
|
462 |
+
|
463 |
+
return self;
|
464 |
+
};
|
465 |
+
|
466 |
+
this.refreshPosition = function () {
|
467 |
+
|
468 |
+
if (! settings.position.enable) {
|
469 |
+
return;
|
470 |
+
}
|
471 |
+
|
472 |
+
var position = $.extend({}, settings.position);
|
473 |
+
|
474 |
+
if (elements[position.of]) {
|
475 |
+
position.of = elements[position.of];
|
476 |
+
}
|
477 |
+
|
478 |
+
elements[position.element].position(position);
|
479 |
+
};
|
480 |
+
|
481 |
+
this.trigger = function (eventName, params) {
|
482 |
+
|
483 |
+
var methodName = 'on' + eventName[0].toUpperCase() + eventName.slice(1);
|
484 |
+
|
485 |
+
if (self[methodName]) {
|
486 |
+
self[methodName](params);
|
487 |
+
}
|
488 |
+
|
489 |
+
var callbacks = events[eventName];
|
490 |
+
|
491 |
+
if (!callbacks) {
|
492 |
+
return;
|
493 |
+
}
|
494 |
+
|
495 |
+
$.each(callbacks, function (index, callback) {
|
496 |
+
|
497 |
+
callback.call(self, params);
|
498 |
+
});
|
499 |
+
|
500 |
+
return self;
|
501 |
+
};
|
502 |
+
|
503 |
+
this.destroy = function() {
|
504 |
+
|
505 |
+
unbindEvents();
|
506 |
+
|
507 |
+
elements.widget.remove();
|
508 |
+
|
509 |
+
self.trigger('destroy');
|
510 |
+
|
511 |
+
return self;
|
512 |
+
};
|
513 |
+
};
|
514 |
+
|
515 |
+
DialogsManager.Widget.prototype.types = [];
|
516 |
+
|
517 |
+
// Inheritable widget methods
|
518 |
+
DialogsManager.Widget.prototype.buildWidget = function () {
|
519 |
+
|
520 |
+
var elements = this.getElements();
|
521 |
+
|
522 |
+
elements.widget.html(elements.message);
|
523 |
+
};
|
524 |
+
|
525 |
+
DialogsManager.Widget.prototype.getDefaultSettings = function () {
|
526 |
+
|
527 |
+
return {};
|
528 |
+
};
|
529 |
+
|
530 |
+
DialogsManager.Widget.prototype.getClosureMethods = function() {
|
531 |
+
|
532 |
+
return [];
|
533 |
+
};
|
534 |
+
|
535 |
+
DialogsManager.Widget.prototype.onHide = function () {
|
536 |
+
};
|
537 |
+
|
538 |
+
DialogsManager.Widget.prototype.onShow = function () {
|
539 |
+
};
|
540 |
+
|
541 |
+
DialogsManager.Widget.prototype.onInit = function () {
|
542 |
+
};
|
543 |
+
|
544 |
+
DialogsManager.Widget.prototype.onReady = function () {
|
545 |
+
};
|
546 |
+
|
547 |
+
DialogsManager.widgetsTypes.simple = DialogsManager.Widget;
|
548 |
+
|
549 |
+
DialogsManager.addWidgetType('buttons', {
|
550 |
+
activeKeyUp: function (event) {
|
551 |
+
|
552 |
+
var TAB_KEY = 9;
|
553 |
+
|
554 |
+
if (event.which === TAB_KEY) {
|
555 |
+
event.preventDefault();
|
556 |
+
}
|
557 |
+
|
558 |
+
if (this.hotKeys[event.which]) {
|
559 |
+
this.hotKeys[event.which](this);
|
560 |
+
}
|
561 |
+
},
|
562 |
+
activeKeyDown: function (event) {
|
563 |
+
|
564 |
+
var TAB_KEY = 9;
|
565 |
+
|
566 |
+
if (event.which === TAB_KEY) {
|
567 |
+
event.preventDefault();
|
568 |
+
|
569 |
+
var currentButtonIndex = this.focusedButton.index(),
|
570 |
+
nextButtonIndex;
|
571 |
+
|
572 |
+
if (event.shiftKey) {
|
573 |
+
|
574 |
+
nextButtonIndex = currentButtonIndex - 1;
|
575 |
+
|
576 |
+
if (nextButtonIndex < 0) {
|
577 |
+
nextButtonIndex = this.buttons.length - 1;
|
578 |
+
}
|
579 |
+
} else {
|
580 |
+
|
581 |
+
nextButtonIndex = currentButtonIndex + 1;
|
582 |
+
|
583 |
+
if (nextButtonIndex >= this.buttons.length) {
|
584 |
+
nextButtonIndex = 0;
|
585 |
+
}
|
586 |
+
}
|
587 |
+
|
588 |
+
this.focusedButton = this.buttons[nextButtonIndex].focus();
|
589 |
+
}
|
590 |
+
},
|
591 |
+
addButton: function (options) {
|
592 |
+
|
593 |
+
var self = this,
|
594 |
+
$button = self.addElement(options.name, $('<' + this.getSettings('buttonTag') + '>').text(options.text), 'button');
|
595 |
+
|
596 |
+
self.buttons.push($button);
|
597 |
+
|
598 |
+
var buttonFn = function () {
|
599 |
+
|
600 |
+
if (self.getSettings('hide').onButtonClick) {
|
601 |
+
self.hide();
|
602 |
+
}
|
603 |
+
|
604 |
+
if ($.isFunction(options.callback)) {
|
605 |
+
options.callback.call(this, self);
|
606 |
+
}
|
607 |
+
};
|
608 |
+
|
609 |
+
$button.on('click', buttonFn);
|
610 |
+
|
611 |
+
if (options.hotKey) {
|
612 |
+
this.hotKeys[options.hotKey] = buttonFn;
|
613 |
+
}
|
614 |
+
|
615 |
+
this.getElements('buttonsWrapper').append($button);
|
616 |
+
|
617 |
+
if (options.focus) {
|
618 |
+
this.focusedButton = $button;
|
619 |
+
}
|
620 |
+
|
621 |
+
return self;
|
622 |
+
},
|
623 |
+
bindHotKeys: function () {
|
624 |
+
|
625 |
+
this.getElements('window').on({
|
626 |
+
keyup: this.activeKeyUp,
|
627 |
+
keydown: this.activeKeyDown
|
628 |
+
});
|
629 |
+
},
|
630 |
+
buildWidget: function () {
|
631 |
+
|
632 |
+
DialogsManager.Widget.prototype.buildWidget.apply(this, arguments);
|
633 |
+
|
634 |
+
var $buttonsWrapper = this.addElement('buttonsWrapper');
|
635 |
+
|
636 |
+
this.getElements('widget').append($buttonsWrapper);
|
637 |
+
},
|
638 |
+
getClosureMethods: function () {
|
639 |
+
|
640 |
+
return [
|
641 |
+
'activeKeyUp',
|
642 |
+
'activeKeyDown'
|
643 |
+
];
|
644 |
+
},
|
645 |
+
getDefaultSettings: function () {
|
646 |
+
|
647 |
+
return {
|
648 |
+
hide: {
|
649 |
+
onButtonClick: true
|
650 |
+
},
|
651 |
+
buttonTag: 'button'
|
652 |
+
};
|
653 |
+
},
|
654 |
+
onHide: function () {
|
655 |
+
|
656 |
+
this.unbindHotKeys();
|
657 |
+
},
|
658 |
+
onInit: function () {
|
659 |
+
|
660 |
+
this.buttons = [];
|
661 |
+
|
662 |
+
this.hotKeys = {};
|
663 |
+
|
664 |
+
this.focusedButton = null;
|
665 |
+
},
|
666 |
+
onShow: function () {
|
667 |
+
|
668 |
+
this.bindHotKeys();
|
669 |
+
|
670 |
+
if (!this.focusedButton) {
|
671 |
+
this.focusedButton = this.buttons[0];
|
672 |
+
}
|
673 |
+
|
674 |
+
if (this.focusedButton) {
|
675 |
+
this.focusedButton.focus();
|
676 |
+
}
|
677 |
+
},
|
678 |
+
unbindHotKeys: function () {
|
679 |
+
|
680 |
+
this.getElements('window').off({
|
681 |
+
keyup: this.activeKeyUp,
|
682 |
+
keydown: this.activeKeyDown
|
683 |
+
});
|
684 |
+
}
|
685 |
+
});
|
686 |
+
|
687 |
+
DialogsManager.addWidgetType('lightbox', DialogsManager.getWidgetType('buttons').extend('lightbox', {
|
688 |
+
getDefaultSettings: function () {
|
689 |
+
|
690 |
+
var settings = DialogsManager.getWidgetType('buttons').prototype.getDefaultSettings.apply(this, arguments);
|
691 |
+
|
692 |
+
return $.extend(true, settings, {
|
693 |
+
headerMessage: '',
|
694 |
+
contentWidth: 'auto',
|
695 |
+
contentHeight: 'auto',
|
696 |
+
closeButton: false,
|
697 |
+
closeButtonClass: 'fa fa-times',
|
698 |
+
position: {
|
699 |
+
element: 'widgetContent',
|
700 |
+
of: 'widget',
|
701 |
+
autoRefresh: true
|
702 |
+
}
|
703 |
+
});
|
704 |
+
},
|
705 |
+
buildWidget: function () {
|
706 |
+
|
707 |
+
DialogsManager.getWidgetType('buttons').prototype.buildWidget.apply(this, arguments);
|
708 |
+
|
709 |
+
var $widgetHeader = this.addElement('widgetHeader'),
|
710 |
+
$widgetContent = this.addElement('widgetContent');
|
711 |
+
|
712 |
+
var elements = this.getElements();
|
713 |
+
|
714 |
+
$widgetContent.append($widgetHeader, elements.message, elements.buttonsWrapper);
|
715 |
+
|
716 |
+
elements.widget.html($widgetContent);
|
717 |
+
|
718 |
+
if (! this.getSettings('closeButton')) {
|
719 |
+
return;
|
720 |
+
}
|
721 |
+
|
722 |
+
var $closeButton = this.addElement('closeButton', '<div><i class="' + this.getSettings('closeButtonClass') + '"></i></div>');
|
723 |
+
|
724 |
+
$widgetContent.prepend($closeButton);
|
725 |
+
},
|
726 |
+
attachEvents: function() {
|
727 |
+
if (this.getSettings('closeButton')) {
|
728 |
+
this.getElements('closeButton').on('click', this.hide);
|
729 |
+
}
|
730 |
+
},
|
731 |
+
onReady: function(){
|
732 |
+
|
733 |
+
var elements = this.getElements(),
|
734 |
+
settings = this.getSettings();
|
735 |
+
|
736 |
+
if ('auto' !== settings.contentWidth) {
|
737 |
+
elements.message.width(settings.contentWidth);
|
738 |
+
}
|
739 |
+
|
740 |
+
if ('auto' !== settings.contentHeight) {
|
741 |
+
elements.message.height(settings.contentHeight);
|
742 |
+
}
|
743 |
+
|
744 |
+
this.setHeaderMessage(settings.headerMessage);
|
745 |
+
},
|
746 |
+
setHeaderMessage: function (message) {
|
747 |
+
|
748 |
+
this.getElements('widgetHeader').html(message);
|
749 |
+
|
750 |
+
return this;
|
751 |
+
}
|
752 |
+
}));
|
753 |
+
|
754 |
+
DialogsManager.addWidgetType('confirm', DialogsManager.getWidgetType('lightbox').extend('confirm', {
|
755 |
+
onReady: function () {
|
756 |
+
|
757 |
+
DialogsManager.getWidgetType('lightbox').prototype.onReady.apply(this, arguments);
|
758 |
+
|
759 |
+
var strings = this.getSettings('strings'),
|
760 |
+
isDefaultCancel = this.getSettings('defaultOption') === 'cancel';
|
761 |
+
|
762 |
+
this.addButton({
|
763 |
+
name: 'cancel',
|
764 |
+
text: strings.cancel,
|
765 |
+
callback: function (widget) {
|
766 |
+
|
767 |
+
widget.trigger('cancel');
|
768 |
+
},
|
769 |
+
focus: isDefaultCancel
|
770 |
+
});
|
771 |
+
|
772 |
+
this.addButton({
|
773 |
+
name: 'ok',
|
774 |
+
text: strings.confirm,
|
775 |
+
callback: function (widget) {
|
776 |
+
|
777 |
+
widget.trigger('confirm');
|
778 |
+
},
|
779 |
+
focus: !isDefaultCancel
|
780 |
+
});
|
781 |
+
},
|
782 |
+
getDefaultSettings: function () {
|
783 |
+
|
784 |
+
var settings = DialogsManager.getWidgetType('lightbox').prototype.getDefaultSettings.apply(this, arguments);
|
785 |
+
|
786 |
+
settings.strings = {
|
787 |
+
confirm: 'OK',
|
788 |
+
cancel: 'Cancel'
|
789 |
+
};
|
790 |
+
|
791 |
+
settings.defaultOption = 'cancel';
|
792 |
+
|
793 |
+
return settings;
|
794 |
+
}
|
795 |
+
}));
|
796 |
+
|
797 |
+
DialogsManager.addWidgetType('alert', DialogsManager.getWidgetType('lightbox').extend('alert', {
|
798 |
+
onReady: function () {
|
799 |
+
|
800 |
+
DialogsManager.getWidgetType('lightbox').prototype.onReady.apply(this, arguments);
|
801 |
+
|
802 |
+
var strings = this.getSettings('strings');
|
803 |
+
|
804 |
+
this.addButton({
|
805 |
+
name: 'ok',
|
806 |
+
text: strings.confirm,
|
807 |
+
callback: function (widget) {
|
808 |
+
|
809 |
+
widget.trigger('confirm');
|
810 |
+
}
|
811 |
+
});
|
812 |
+
},
|
813 |
+
getDefaultSettings: function () {
|
814 |
+
|
815 |
+
var settings = DialogsManager.getWidgetType('lightbox').prototype.getDefaultSettings.apply(this, arguments);
|
816 |
+
|
817 |
+
settings.strings = {
|
818 |
+
confirm: 'OK'
|
819 |
+
};
|
820 |
+
|
821 |
+
return settings;
|
822 |
+
}
|
823 |
+
}));
|
824 |
+
|
825 |
+
// Exporting the DialogsManager variable to global
|
826 |
+
global.DialogsManager = DialogsManager;
|
827 |
+
})(
|
828 |
+
typeof jQuery !== 'undefined' ? jQuery : typeof require === 'function' && require('jquery'),
|
829 |
+
typeof module !== 'undefined' ? module.exports : window
|
830 |
+
);
|
admin/assets/pa-elements-font/css/pa-elements.css
CHANGED
@@ -23,6 +23,9 @@
|
|
23 |
-webkit-font-smoothing: antialiased;
|
24 |
-moz-osx-font-smoothing: grayscale;
|
25 |
}
|
|
|
|
|
|
|
26 |
.pa-grid-icon:before {
|
27 |
content: "\e906";
|
28 |
}
|
23 |
-webkit-font-smoothing: antialiased;
|
24 |
-moz-osx-font-smoothing: grayscale;
|
25 |
}
|
26 |
+
.elementor-element-wrapper:hover [class^="pa-"], .elementor-element-wrapper:hover [class*=" pa-"]{
|
27 |
+
color: #b7084e;
|
28 |
+
}
|
29 |
.pa-grid-icon:before {
|
30 |
content: "\e906";
|
31 |
}
|
admin/settings-page.php
CHANGED
@@ -4,7 +4,7 @@ if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly
|
|
4 |
|
5 |
class PA_admin_settings {
|
6 |
|
7 |
-
public $pa_elements_keys = ['premium-banner', 'premium-blog','premium-carousel', 'premium-countdown','premium-counter','premium-dual-header','premium-fancytext','premium-image-separator','premium-maps','premium-modalbox','premium-person','premium-progressbar','premium-testimonials','premium-title','premium-videobox','premium-pricing-table','premium-button','premium-contactform', 'premium-image-button', 'premium-map-api', 'premium-map-disable-api','premium-grid'];
|
8 |
|
9 |
private $pa_default_settings;
|
10 |
|
@@ -16,17 +16,35 @@ class PA_admin_settings {
|
|
16 |
add_action( 'admin_menu', array( $this,'pa_admin_menu') );
|
17 |
add_action('init', array( $this, 'pa_admin_page_scripts' ) );
|
18 |
add_action( 'wp_ajax_pa_save_admin_addons_settings', array( $this, 'pa_save_settings_with_ajax' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
}
|
20 |
|
21 |
public function pa_admin_page_scripts () {
|
22 |
wp_enqueue_style( 'pa_admin_icon', plugins_url( '/', __FILE__ ).'assets/pa-elements-font/css/pafont.css' );
|
23 |
if( isset( $_GET['page'] ) && $_GET['page'] == 'pa-settings-page' ) {
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
28 |
wp_enqueue_script( 'premium_addons_sweetalert2-js', plugins_url( '/', __FILE__ ).'assets/js/sweetalert2/js/sweetalert2.min.js', array( 'jquery', 'premium_addons_sweet-js' ), '1.0', true );
|
29 |
-
|
30 |
}
|
31 |
|
32 |
public function pa_admin_menu() {
|
@@ -39,18 +57,17 @@ class PA_admin_settings {
|
|
39 |
);
|
40 |
wp_localize_script( 'pa-addons-elementor-admin-js', 'settings', $js_info );
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
$this->pa_get_settings = get_option( 'pa_save_settings', $this->pa_default_settings );
|
45 |
|
46 |
-
|
47 |
|
48 |
-
|
49 |
-
$pa_updated_settings = array_merge( $this->pa_get_settings, $pa_new_settings );
|
50 |
-
update_option( 'pa_save_settings', $pa_updated_settings );
|
51 |
-
}
|
52 |
-
$this->pa_get_settings = get_option( 'pa_save_settings', $this->pa_default_settings );
|
53 |
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
?>
|
56 |
<div class="wrap">
|
@@ -71,6 +88,7 @@ class PA_admin_settings {
|
|
71 |
<li><a class="pa-tab-list-item" href="#pa-about">About</a></li>
|
72 |
<li><a class="pa-tab-list-item" href="#pa-modules">Elements</a></li>
|
73 |
<li><a class="pa-tab-list-item" href="#pa-maps-api">Google Maps API</a></li>
|
|
|
74 |
<li><a class="pa-tab-list-item" href="#pa-system">System Info</a></li>
|
75 |
</ul>
|
76 |
<div id="pa-about" class="pa-settings-tab">
|
@@ -82,7 +100,7 @@ class PA_admin_settings {
|
|
82 |
</div>
|
83 |
<div class="pa-text-container">
|
84 |
<h4>What is Premium Addons?</h4>
|
85 |
-
<p>Premium Addons for Elementor that extends Elementor Page Builder capabilities with
|
86 |
</div>
|
87 |
</div>
|
88 |
</div>
|
@@ -329,16 +347,43 @@ class PA_admin_settings {
|
|
329 |
<input type="submit" value="Save Settings" class="button pa-btn pa-save-button">
|
330 |
</div>
|
331 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
<div id="pa-system" class="pa-settings-tab">
|
333 |
<div class="pa-row">
|
|
|
334 |
<h3><?php echo esc_html__('System setup information useful for debugging purposes.','premium-addons-for-elementor');?></h3>
|
335 |
<div class="pa-system-info-container">
|
336 |
<?php
|
337 |
echo nl2br(pa_get_sysinfo());
|
338 |
?>
|
339 |
-
|
340 |
</div>
|
341 |
</div>
|
|
|
342 |
<div>
|
343 |
<p>Did you like Premium Addons for Elementor Plugin? Please<a href="https://wordpress.org/support/plugin/premium-addons-for-elementor/reviews/#new-post" target="_blank"> Click Here to Rate it ★★★★★</a></p>
|
344 |
</div>
|
@@ -380,6 +425,7 @@ class PA_admin_settings {
|
|
380 |
'premium-grid' => intval( $settings['premium-grid'] ? 1 : 0),
|
381 |
'premium-map-api' => $settings['premium-map-api'],
|
382 |
'premium-map-disable-api' => intval( $settings['premium-map-disable-api'] ? 1 : 0),
|
|
|
383 |
);
|
384 |
update_option( 'pa_save_settings', $this->pa_settings );
|
385 |
|
4 |
|
5 |
class PA_admin_settings {
|
6 |
|
7 |
+
public $pa_elements_keys = ['premium-banner', 'premium-blog','premium-carousel', 'premium-countdown','premium-counter','premium-dual-header','premium-fancytext','premium-image-separator','premium-maps','premium-modalbox','premium-person','premium-progressbar','premium-testimonials','premium-title','premium-videobox','premium-pricing-table','premium-button','premium-contactform', 'premium-image-button', 'premium-map-api', 'premium-map-disable-api','premium-grid', 'is-beta-tester'];
|
8 |
|
9 |
private $pa_default_settings;
|
10 |
|
16 |
add_action( 'admin_menu', array( $this,'pa_admin_menu') );
|
17 |
add_action('init', array( $this, 'pa_admin_page_scripts' ) );
|
18 |
add_action( 'wp_ajax_pa_save_admin_addons_settings', array( $this, 'pa_save_settings_with_ajax' ) );
|
19 |
+
add_action('admin_enqueue_scripts',array( $this, 'localize_js_script' ) );
|
20 |
+
}
|
21 |
+
|
22 |
+
public function localize_js_script(){
|
23 |
+
wp_localize_script(
|
24 |
+
'pa-addons-elementor-admin-js',
|
25 |
+
'premiumRollBackConfirm',
|
26 |
+
[
|
27 |
+
'home_url' => home_url(),
|
28 |
+
'i18n' => [
|
29 |
+
'rollback_confirm' => __( 'Are you sure you want to reinstall version ' . PREMIUM_ADDONS_STABLE_VERSION . ' ?', 'premium-addons-for-elementor' ),
|
30 |
+
'rollback_to_previous_version' => __( 'Rollback to Previous Version', 'premium-addons-for-elementor' ),
|
31 |
+
'yes' => __( 'Yes', 'premium-addons-for-elementor' ),
|
32 |
+
'cancel' => __( 'Cancel', 'premium-addons-for-elementor' ),
|
33 |
+
],
|
34 |
+
]
|
35 |
+
);
|
36 |
}
|
37 |
|
38 |
public function pa_admin_page_scripts () {
|
39 |
wp_enqueue_style( 'pa_admin_icon', plugins_url( '/', __FILE__ ).'assets/pa-elements-font/css/pafont.css' );
|
40 |
if( isset( $_GET['page'] ) && $_GET['page'] == 'pa-settings-page' ) {
|
41 |
+
wp_enqueue_style( 'premium_addons_elementor-css', plugins_url( '/', __FILE__ ).'assets/admin.css' );
|
42 |
+
wp_enqueue_style( 'premium_addons-sweetalert2-css', plugins_url( '/', __FILE__ ).'assets/js/sweetalert2/css/sweetalert2.min.css' );
|
43 |
+
wp_enqueue_script('pa-addons-elementor-admin-js', plugins_url( '/' , __FILE__ ).'assets/admin.js' , array('jquery','jquery-ui-tabs'), '1.0' , true );
|
44 |
+
wp_enqueue_script('pa-dialog',PREMIUM_ADDONS_URL . 'admin/assets/js/dialog/dialog.js',array('jquery-ui-position'),'4.2.1',true);
|
45 |
+
wp_enqueue_script( 'premium_addons_sweet-js', plugins_url( '/', __FILE__ ).'assets/js/sweetalert2/js/core.js', array( 'jquery' ), '1.0', true );
|
46 |
wp_enqueue_script( 'premium_addons_sweetalert2-js', plugins_url( '/', __FILE__ ).'assets/js/sweetalert2/js/sweetalert2.min.js', array( 'jquery', 'premium_addons_sweet-js' ), '1.0', true );
|
47 |
+
}
|
48 |
}
|
49 |
|
50 |
public function pa_admin_menu() {
|
57 |
);
|
58 |
wp_localize_script( 'pa-addons-elementor-admin-js', 'settings', $js_info );
|
59 |
|
60 |
+
$this->pa_default_settings = array_fill_keys( $this->pa_elements_keys, true );
|
|
|
|
|
61 |
|
62 |
+
$this->pa_get_settings = get_option( 'pa_save_settings', $this->pa_default_settings );
|
63 |
|
64 |
+
$pa_new_settings = array_diff_key( $this->pa_default_settings, $this->pa_get_settings );
|
|
|
|
|
|
|
|
|
65 |
|
66 |
+
if( ! empty( $pa_new_settings ) ) {
|
67 |
+
$pa_updated_settings = array_merge( $this->pa_get_settings, $pa_new_settings );
|
68 |
+
update_option( 'pa_save_settings', $pa_updated_settings );
|
69 |
+
}
|
70 |
+
$this->pa_get_settings = get_option( 'pa_save_settings', $this->pa_default_settings );
|
71 |
|
72 |
?>
|
73 |
<div class="wrap">
|
88 |
<li><a class="pa-tab-list-item" href="#pa-about">About</a></li>
|
89 |
<li><a class="pa-tab-list-item" href="#pa-modules">Elements</a></li>
|
90 |
<li><a class="pa-tab-list-item" href="#pa-maps-api">Google Maps API</a></li>
|
91 |
+
<li><a class="pa-tab-list-item" href="#pa-maintenance">Version Control</a></li>
|
92 |
<li><a class="pa-tab-list-item" href="#pa-system">System Info</a></li>
|
93 |
</ul>
|
94 |
<div id="pa-about" class="pa-settings-tab">
|
100 |
</div>
|
101 |
<div class="pa-text-container">
|
102 |
<h4>What is Premium Addons?</h4>
|
103 |
+
<p>Premium Addons for Elementor that extends Elementor Page Builder capabilities with 20 fully customizable elements that helps you build impressive websites with no coding required.</p>
|
104 |
</div>
|
105 |
</div>
|
106 |
</div>
|
347 |
<input type="submit" value="Save Settings" class="button pa-btn pa-save-button">
|
348 |
</div>
|
349 |
</div>
|
350 |
+
<div id="pa-maintenance" class="pa-settings-tab">
|
351 |
+
<div class="pa-row">
|
352 |
+
<table class="pa-beta-table">
|
353 |
+
<tr>
|
354 |
+
<th><h4 class="pa-roll-back">Rollback to Previous Version</h4><span class="pa-roll-back-span"><?php echo sprintf('Experiencing an issue with Premium Addons for Elementor version %s? Rollback to a previous version before the issue appeared.',PREMIUM_ADDONS_VERSION); ?></span></th>
|
355 |
+
</tr>
|
356 |
+
|
357 |
+
<tr class="pa-roll-row">
|
358 |
+
<th>Rollback Version</th>
|
359 |
+
<td><div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.1.2</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div><p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p></td>
|
360 |
+
</tr>
|
361 |
+
<tr>
|
362 |
+
<th><h4 class="pa-beta-test">Become a Beta Tester</h4><span class="pa-beta-test-span">Turn-on Beta Tester, to get notified when a new beta version of Premium Addons for Elementor. The Beta version will not install automatically. You always have the option to ignore it.</span></th>
|
363 |
+
</tr>
|
364 |
+
<tr class="pa-beta-row">
|
365 |
+
<th><?php echo esc_html__('Beta Tester','premium-addons-for-elementor');?></th>
|
366 |
+
<td><div><input name="is-beta-tester" id="is-beta-tester" type="checkbox" <?php checked(0, $this->pa_get_settings['is-beta-tester'], true) ?>><span><?php echo esc_html__('Check this box to get updates for beta versions','premium-addons-for-elementor'); ?></span></div><p class="pa-beta-desc"><span>Please Note: We do not recommend updating to a beta version on production sites.</span></p></td>
|
367 |
+
</tr>
|
368 |
+
|
369 |
+
</table>
|
370 |
+
|
371 |
+
<input type="submit" value="Save Settings" class="button pa-btn pa-save-button">
|
372 |
+
|
373 |
+
</div>
|
374 |
+
</div>
|
375 |
<div id="pa-system" class="pa-settings-tab">
|
376 |
<div class="pa-row">
|
377 |
+
|
378 |
<h3><?php echo esc_html__('System setup information useful for debugging purposes.','premium-addons-for-elementor');?></h3>
|
379 |
<div class="pa-system-info-container">
|
380 |
<?php
|
381 |
echo nl2br(pa_get_sysinfo());
|
382 |
?>
|
383 |
+
</div>
|
384 |
</div>
|
385 |
</div>
|
386 |
+
|
387 |
<div>
|
388 |
<p>Did you like Premium Addons for Elementor Plugin? Please<a href="https://wordpress.org/support/plugin/premium-addons-for-elementor/reviews/#new-post" target="_blank"> Click Here to Rate it ★★★★★</a></p>
|
389 |
</div>
|
425 |
'premium-grid' => intval( $settings['premium-grid'] ? 1 : 0),
|
426 |
'premium-map-api' => $settings['premium-map-api'],
|
427 |
'premium-map-disable-api' => intval( $settings['premium-map-disable-api'] ? 1 : 0),
|
428 |
+
'is-beta-tester' => intval( $settings['is-beta-tester'] ? 0 : 1),
|
429 |
);
|
430 |
update_option( 'pa_save_settings', $this->pa_settings );
|
431 |
|
assets/images/premium-addons-logo.png
ADDED
Binary file
|
assets/js/lib/jquery.waypoints.js
ADDED
@@ -0,0 +1,502 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Generated by CoffeeScript 1.4.0
|
2 |
+
|
3 |
+
/*
|
4 |
+
jQuery Waypoints - v2.0.2
|
5 |
+
Copyright (c) 2011-2013 Caleb Troughton
|
6 |
+
Dual licensed under the MIT license and GPL license.
|
7 |
+
https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt
|
8 |
+
*/
|
9 |
+
|
10 |
+
|
11 |
+
(function() {
|
12 |
+
var __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
|
13 |
+
__slice = [].slice;
|
14 |
+
|
15 |
+
(function(root, factory) {
|
16 |
+
if (typeof define === 'function' && define.amd) {
|
17 |
+
return define('waypoints', ['jquery'], function($) {
|
18 |
+
return factory($, root);
|
19 |
+
});
|
20 |
+
} else {
|
21 |
+
return factory(root.jQuery, root);
|
22 |
+
}
|
23 |
+
})(this, function($, window) {
|
24 |
+
var $w, Context, Waypoint, allWaypoints, contextCounter, contextKey, contexts, isTouch, jQMethods, methods, resizeEvent, scrollEvent, waypointCounter, waypointKey, wp, wps;
|
25 |
+
$w = $(window);
|
26 |
+
isTouch = __indexOf.call(window, 'ontouchstart') >= 0;
|
27 |
+
allWaypoints = {
|
28 |
+
horizontal: {},
|
29 |
+
vertical: {}
|
30 |
+
};
|
31 |
+
contextCounter = 1;
|
32 |
+
contexts = {};
|
33 |
+
contextKey = 'waypoints-context-id';
|
34 |
+
resizeEvent = 'resize.waypoints';
|
35 |
+
scrollEvent = 'scroll.waypoints';
|
36 |
+
waypointCounter = 1;
|
37 |
+
waypointKey = 'waypoints-waypoint-ids';
|
38 |
+
wp = 'waypoint';
|
39 |
+
wps = 'waypoints';
|
40 |
+
Context = (function() {
|
41 |
+
|
42 |
+
function Context($element) {
|
43 |
+
var _this = this;
|
44 |
+
this.$element = $element;
|
45 |
+
this.element = $element[0];
|
46 |
+
this.didResize = false;
|
47 |
+
this.didScroll = false;
|
48 |
+
this.id = 'context' + contextCounter++;
|
49 |
+
this.oldScroll = {
|
50 |
+
x: $element.scrollLeft(),
|
51 |
+
y: $element.scrollTop()
|
52 |
+
};
|
53 |
+
this.waypoints = {
|
54 |
+
horizontal: {},
|
55 |
+
vertical: {}
|
56 |
+
};
|
57 |
+
$element.data(contextKey, this.id);
|
58 |
+
contexts[this.id] = this;
|
59 |
+
$element.bind(scrollEvent, function() {
|
60 |
+
var scrollHandler;
|
61 |
+
if (!(_this.didScroll || isTouch)) {
|
62 |
+
_this.didScroll = true;
|
63 |
+
scrollHandler = function() {
|
64 |
+
_this.doScroll();
|
65 |
+
return _this.didScroll = false;
|
66 |
+
};
|
67 |
+
return window.setTimeout(scrollHandler, $[wps].settings.scrollThrottle);
|
68 |
+
}
|
69 |
+
});
|
70 |
+
$element.bind(resizeEvent, function() {
|
71 |
+
var resizeHandler;
|
72 |
+
if (!_this.didResize) {
|
73 |
+
_this.didResize = true;
|
74 |
+
resizeHandler = function() {
|
75 |
+
$[wps]('refresh');
|
76 |
+
return _this.didResize = false;
|
77 |
+
};
|
78 |
+
return window.setTimeout(resizeHandler, $[wps].settings.resizeThrottle);
|
79 |
+
}
|
80 |
+
});
|
81 |
+
}
|
82 |
+
|
83 |
+
Context.prototype.doScroll = function() {
|
84 |
+
var axes,
|
85 |
+
_this = this;
|
86 |
+
axes = {
|
87 |
+
horizontal: {
|
88 |
+
newScroll: this.$element.scrollLeft(),
|
89 |
+
oldScroll: this.oldScroll.x,
|
90 |
+
forward: 'right',
|
91 |
+
backward: 'left'
|
92 |
+
},
|
93 |
+
vertical: {
|
94 |
+
newScroll: this.$element.scrollTop(),
|
95 |
+
oldScroll: this.oldScroll.y,
|
96 |
+
forward: 'down',
|
97 |
+
backward: 'up'
|
98 |
+
}
|
99 |
+
};
|
100 |
+
if (isTouch && (!axes.vertical.oldScroll || !axes.vertical.newScroll)) {
|
101 |
+
$[wps]('refresh');
|
102 |
+
}
|
103 |
+
$.each(axes, function(aKey, axis) {
|
104 |
+
var direction, isForward, triggered;
|
105 |
+
triggered = [];
|
106 |
+
isForward = axis.newScroll > axis.oldScroll;
|
107 |
+
direction = isForward ? axis.forward : axis.backward;
|
108 |
+
$.each(_this.waypoints[aKey], function(wKey, waypoint) {
|
109 |
+
var _ref, _ref1;
|
110 |
+
if ((axis.oldScroll < (_ref = waypoint.offset) && _ref <= axis.newScroll)) {
|
111 |
+
return triggered.push(waypoint);
|
112 |
+
} else if ((axis.newScroll < (_ref1 = waypoint.offset) && _ref1 <= axis.oldScroll)) {
|
113 |
+
return triggered.push(waypoint);
|
114 |
+
}
|
115 |
+
});
|
116 |
+
triggered.sort(function(a, b) {
|
117 |
+
return a.offset - b.offset;
|
118 |
+
});
|
119 |
+
if (!isForward) {
|
120 |
+
triggered.reverse();
|
121 |
+
}
|
122 |
+
return $.each(triggered, function(i, waypoint) {
|
123 |
+
if (waypoint.options.continuous || i === triggered.length - 1) {
|
124 |
+
return waypoint.trigger([direction]);
|
125 |
+
}
|
126 |
+
});
|
127 |
+
});
|
128 |
+
return this.oldScroll = {
|
129 |
+
x: axes.horizontal.newScroll,
|
130 |
+
y: axes.vertical.newScroll
|
131 |
+
};
|
132 |
+
};
|
133 |
+
|
134 |
+
Context.prototype.refresh = function() {
|
135 |
+
var axes, cOffset, isWin,
|
136 |
+
_this = this;
|
137 |
+
isWin = $.isWindow(this.element);
|
138 |
+
cOffset = this.$element.offset();
|
139 |
+
this.doScroll();
|
140 |
+
axes = {
|
141 |
+
horizontal: {
|
142 |
+
contextOffset: isWin ? 0 : cOffset.left,
|
143 |
+
contextScroll: isWin ? 0 : this.oldScroll.x,
|
144 |
+
contextDimension: this.$element.width(),
|
145 |
+
oldScroll: this.oldScroll.x,
|
146 |
+
forward: 'right',
|
147 |
+
backward: 'left',
|
148 |
+
offsetProp: 'left'
|
149 |
+
},
|
150 |
+
vertical: {
|
151 |
+
contextOffset: isWin ? 0 : cOffset.top,
|
152 |
+
contextScroll: isWin ? 0 : this.oldScroll.y,
|
153 |
+
contextDimension: isWin ? $[wps]('viewportHeight') : this.$element.height(),
|
154 |
+
oldScroll: this.oldScroll.y,
|
155 |
+
forward: 'down',
|
156 |
+
backward: 'up',
|
157 |
+
offsetProp: 'top'
|
158 |
+
}
|
159 |
+
};
|
160 |
+
return $.each(axes, function(aKey, axis) {
|
161 |
+
return $.each(_this.waypoints[aKey], function(i, waypoint) {
|
162 |
+
var adjustment, elementOffset, oldOffset, _ref, _ref1;
|
163 |
+
adjustment = waypoint.options.offset;
|
164 |
+
oldOffset = waypoint.offset;
|
165 |
+
elementOffset = $.isWindow(waypoint.element) ? 0 : waypoint.$element.offset()[axis.offsetProp];
|
166 |
+
if ($.isFunction(adjustment)) {
|
167 |
+
adjustment = adjustment.apply(waypoint.element);
|
168 |
+
} else if (typeof adjustment === 'string') {
|
169 |
+
adjustment = parseFloat(adjustment);
|
170 |
+
if (waypoint.options.offset.indexOf('%') > -1) {
|
171 |
+
adjustment = Math.ceil(axis.contextDimension * adjustment / 100);
|
172 |
+
}
|
173 |
+
}
|
174 |
+
waypoint.offset = elementOffset - axis.contextOffset + axis.contextScroll - adjustment;
|
175 |
+
if ((waypoint.options.onlyOnScroll && (oldOffset != null)) || !waypoint.enabled) {
|
176 |
+
return;
|
177 |
+
}
|
178 |
+
if (oldOffset !== null && (oldOffset < (_ref = axis.oldScroll) && _ref <= waypoint.offset)) {
|
179 |
+
return waypoint.trigger([axis.backward]);
|
180 |
+
} else if (oldOffset !== null && (oldOffset > (_ref1 = axis.oldScroll) && _ref1 >= waypoint.offset)) {
|
181 |
+
return waypoint.trigger([axis.forward]);
|
182 |
+
} else if (oldOffset === null && axis.oldScroll >= waypoint.offset) {
|
183 |
+
return waypoint.trigger([axis.forward]);
|
184 |
+
}
|
185 |
+
});
|
186 |
+
});
|
187 |
+
};
|
188 |
+
|
189 |
+
Context.prototype.checkEmpty = function() {
|
190 |
+
if ($.isEmptyObject(this.waypoints.horizontal) && $.isEmptyObject(this.waypoints.vertical)) {
|
191 |
+
this.$element.unbind([resizeEvent, scrollEvent].join(' '));
|
192 |
+
return delete contexts[this.id];
|
193 |
+
}
|
194 |
+
};
|
195 |
+
|
196 |
+
return Context;
|
197 |
+
|
198 |
+
})();
|
199 |
+
Waypoint = (function() {
|
200 |
+
|
201 |
+
function Waypoint($element, context, options) {
|
202 |
+
var idList, _ref;
|
203 |
+
options = $.extend({}, $.fn[wp].defaults, options);
|
204 |
+
if (options.offset === 'bottom-in-view') {
|
205 |
+
options.offset = function() {
|
206 |
+
var contextHeight;
|
207 |
+
contextHeight = $[wps]('viewportHeight');
|
208 |
+
if (!$.isWindow(context.element)) {
|
209 |
+
contextHeight = context.$element.height();
|
210 |
+
}
|
211 |
+
return contextHeight - $(this).outerHeight();
|
212 |
+
};
|
213 |
+
}
|
214 |
+
this.$element = $element;
|
215 |
+
this.element = $element[0];
|
216 |
+
this.axis = options.horizontal ? 'horizontal' : 'vertical';
|
217 |
+
this.callback = options.handler;
|
218 |
+
this.context = context;
|
219 |
+
this.enabled = options.enabled;
|
220 |
+
this.id = 'waypoints' + waypointCounter++;
|
221 |
+
this.offset = null;
|
222 |
+
this.options = options;
|
223 |
+
context.waypoints[this.axis][this.id] = this;
|
224 |
+
allWaypoints[this.axis][this.id] = this;
|
225 |
+
idList = (_ref = $element.data(waypointKey)) != null ? _ref : [];
|
226 |
+
idList.push(this.id);
|
227 |
+
$element.data(waypointKey, idList);
|
228 |
+
}
|
229 |
+
|
230 |
+
Waypoint.prototype.trigger = function(args) {
|
231 |
+
if (!this.enabled) {
|
232 |
+
return;
|
233 |
+
}
|
234 |
+
if (this.callback != null) {
|
235 |
+
this.callback.apply(this.element, args);
|
236 |
+
}
|
237 |
+
if (this.options.triggerOnce) {
|
238 |
+
return this.destroy();
|
239 |
+
}
|
240 |
+
};
|
241 |
+
|
242 |
+
Waypoint.prototype.disable = function() {
|
243 |
+
return this.enabled = false;
|
244 |
+
};
|
245 |
+
|
246 |
+
Waypoint.prototype.enable = function() {
|
247 |
+
this.context.refresh();
|
248 |
+
return this.enabled = true;
|
249 |
+
};
|
250 |
+
|
251 |
+
Waypoint.prototype.destroy = function() {
|
252 |
+
delete allWaypoints[this.axis][this.id];
|
253 |
+
delete this.context.waypoints[this.axis][this.id];
|
254 |
+
return this.context.checkEmpty();
|
255 |
+
};
|
256 |
+
|
257 |
+
Waypoint.getWaypointsByElement = function(element) {
|
258 |
+
var all, ids;
|
259 |
+
ids = $(element).data(waypointKey);
|
260 |
+
if (!ids) {
|
261 |
+
return [];
|
262 |
+
}
|
263 |
+
all = $.extend({}, allWaypoints.horizontal, allWaypoints.vertical);
|
264 |
+
return $.map(ids, function(id) {
|
265 |
+
return all[id];
|
266 |
+
});
|
267 |
+
};
|
268 |
+
|
269 |
+
return Waypoint;
|
270 |
+
|
271 |
+
})();
|
272 |
+
methods = {
|
273 |
+
init: function(f, options) {
|
274 |
+
var _ref;
|
275 |
+
if (options == null) {
|
276 |
+
options = {};
|
277 |
+
}
|
278 |
+
if ((_ref = options.handler) == null) {
|
279 |
+
options.handler = f;
|
280 |
+
}
|
281 |
+
this.each(function() {
|
282 |
+
var $this, context, contextElement, _ref1;
|
283 |
+
$this = $(this);
|
284 |
+
contextElement = (_ref1 = options.context) != null ? _ref1 : $.fn[wp].defaults.context;
|
285 |
+
if (!$.isWindow(contextElement)) {
|
286 |
+
contextElement = $this.closest(contextElement);
|
287 |
+
}
|
288 |
+
contextElement = $(contextElement);
|
289 |
+
context = contexts[contextElement.data(contextKey)];
|
290 |
+
if (!context) {
|
291 |
+
context = new Context(contextElement);
|
292 |
+
}
|
293 |
+
return new Waypoint($this, context, options);
|
294 |
+
});
|
295 |
+
$[wps]('refresh');
|
296 |
+
return this;
|
297 |
+
},
|
298 |
+
disable: function() {
|
299 |
+
return methods._invoke(this, 'disable');
|
300 |
+
},
|
301 |
+
enable: function() {
|
302 |
+
return methods._invoke(this, 'enable');
|
303 |
+
},
|
304 |
+
destroy: function() {
|
305 |
+
return methods._invoke(this, 'destroy');
|
306 |
+
},
|
307 |
+
prev: function(axis, selector) {
|
308 |
+
return methods._traverse.call(this, axis, selector, function(stack, index, waypoints) {
|
309 |
+
if (index > 0) {
|
310 |
+
return stack.push(waypoints[index - 1]);
|
311 |
+
}
|
312 |
+
});
|
313 |
+
},
|
314 |
+
next: function(axis, selector) {
|
315 |
+
return methods._traverse.call(this, axis, selector, function(stack, index, waypoints) {
|
316 |
+
if (index < waypoints.length - 1) {
|
317 |
+
return stack.push(waypoints[index + 1]);
|
318 |
+
}
|
319 |
+
});
|
320 |
+
},
|
321 |
+
_traverse: function(axis, selector, push) {
|
322 |
+
var stack, waypoints;
|
323 |
+
if (axis == null) {
|
324 |
+
axis = 'vertical';
|
325 |
+
}
|
326 |
+
if (selector == null) {
|
327 |
+
selector = window;
|
328 |
+
}
|
329 |
+
waypoints = jQMethods.aggregate(selector);
|
330 |
+
stack = [];
|
331 |
+
this.each(function() {
|
332 |
+
var index;
|
333 |
+
index = $.inArray(this, waypoints[axis]);
|
334 |
+
return push(stack, index, waypoints[axis]);
|
335 |
+
});
|
336 |
+
return this.pushStack(stack);
|
337 |
+
},
|
338 |
+
_invoke: function($elements, method) {
|
339 |
+
$elements.each(function() {
|
340 |
+
var waypoints;
|
341 |
+
waypoints = Waypoint.getWaypointsByElement(this);
|
342 |
+
return $.each(waypoints, function(i, waypoint) {
|
343 |
+
waypoint[method]();
|
344 |
+
return true;
|
345 |
+
});
|
346 |
+
});
|
347 |
+
return this;
|
348 |
+
}
|
349 |
+
};
|
350 |
+
$.fn[wp] = function() {
|
351 |
+
var args, method;
|
352 |
+
method = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
|
353 |
+
if (methods[method]) {
|
354 |
+
return methods[method].apply(this, args);
|
355 |
+
} else if ($.isFunction(method)) {
|
356 |
+
return methods.init.apply(this, arguments);
|
357 |
+
} else if ($.isPlainObject(method)) {
|
358 |
+
return methods.init.apply(this, [null, method]);
|
359 |
+
} else if (!method) {
|
360 |
+
return $.error("jQuery Waypoints needs a callback function or handler option.");
|
361 |
+
} else {
|
362 |
+
return $.error("The " + method + " method does not exist in jQuery Waypoints.");
|
363 |
+
}
|
364 |
+
};
|
365 |
+
$.fn[wp].defaults = {
|
366 |
+
context: window,
|
367 |
+
continuous: true,
|
368 |
+
enabled: true,
|
369 |
+
horizontal: false,
|
370 |
+
offset: 0,
|
371 |
+
triggerOnce: false
|
372 |
+
};
|
373 |
+
jQMethods = {
|
374 |
+
refresh: function() {
|
375 |
+
return $.each(contexts, function(i, context) {
|
376 |
+
return context.refresh();
|
377 |
+
});
|
378 |
+
},
|
379 |
+
viewportHeight: function() {
|
380 |
+
var _ref;
|
381 |
+
return (_ref = window.innerHeight) != null ? _ref : $w.height();
|
382 |
+
},
|
383 |
+
aggregate: function(contextSelector) {
|
384 |
+
var collection, waypoints, _ref;
|
385 |
+
collection = allWaypoints;
|
386 |
+
if (contextSelector) {
|
387 |
+
collection = (_ref = contexts[$(contextSelector).data(contextKey)]) != null ? _ref.waypoints : void 0;
|
388 |
+
}
|
389 |
+
if (!collection) {
|
390 |
+
return [];
|
391 |
+
}
|
392 |
+
waypoints = {
|
393 |
+
horizontal: [],
|
394 |
+
vertical: []
|
395 |
+
};
|
396 |
+
$.each(waypoints, function(axis, arr) {
|
397 |
+
$.each(collection[axis], function(key, waypoint) {
|
398 |
+
return arr.push(waypoint);
|
399 |
+
});
|
400 |
+
arr.sort(function(a, b) {
|
401 |
+
return a.offset - b.offset;
|
402 |
+
});
|
403 |
+
waypoints[axis] = $.map(arr, function(waypoint) {
|
404 |
+
return waypoint.element;
|
405 |
+
});
|
406 |
+
return waypoints[axis] = $.unique(waypoints[axis]);
|
407 |
+
});
|
408 |
+
return waypoints;
|
409 |
+
},
|
410 |
+
above: function(contextSelector) {
|
411 |
+
if (contextSelector == null) {
|
412 |
+
contextSelector = window;
|
413 |
+
}
|
414 |
+
return jQMethods._filter(contextSelector, 'vertical', function(context, waypoint) {
|
415 |
+
return waypoint.offset <= context.oldScroll.y;
|
416 |
+
});
|
417 |
+
},
|
418 |
+
below: function(contextSelector) {
|
419 |
+
if (contextSelector == null) {
|
420 |
+
contextSelector = window;
|
421 |
+
}
|
422 |
+
return jQMethods._filter(contextSelector, 'vertical', function(context, waypoint) {
|
423 |
+
return waypoint.offset > context.oldScroll.y;
|
424 |
+
});
|
425 |
+
},
|
426 |
+
left: function(contextSelector) {
|
427 |
+
if (contextSelector == null) {
|
428 |
+
contextSelector = window;
|
429 |
+
}
|
430 |
+
return jQMethods._filter(contextSelector, 'horizontal', function(context, waypoint) {
|
431 |
+
return waypoint.offset <= context.oldScroll.x;
|
432 |
+
});
|
433 |
+
},
|
434 |
+
right: function(contextSelector) {
|
435 |
+
if (contextSelector == null) {
|
436 |
+
contextSelector = window;
|
437 |
+
}
|
438 |
+
return jQMethods._filter(contextSelector, 'horizontal', function(context, waypoint) {
|
439 |
+
return waypoint.offset > context.oldScroll.x;
|
440 |
+
});
|
441 |
+
},
|
442 |
+
enable: function() {
|
443 |
+
return jQMethods._invoke('enable');
|
444 |
+
},
|
445 |
+
disable: function() {
|
446 |
+
return jQMethods._invoke('disable');
|
447 |
+
},
|
448 |
+
destroy: function() {
|
449 |
+
return jQMethods._invoke('destroy');
|
450 |
+
},
|
451 |
+
extendFn: function(methodName, f) {
|
452 |
+
return methods[methodName] = f;
|
453 |
+
},
|
454 |
+
_invoke: function(method) {
|
455 |
+
var waypoints;
|
456 |
+
waypoints = $.extend({}, allWaypoints.vertical, allWaypoints.horizontal);
|
457 |
+
return $.each(waypoints, function(key, waypoint) {
|
458 |
+
waypoint[method]();
|
459 |
+
return true;
|
460 |
+
});
|
461 |
+
},
|
462 |
+
_filter: function(selector, axis, test) {
|
463 |
+
var context, waypoints;
|
464 |
+
context = contexts[$(selector).data(contextKey)];
|
465 |
+
if (!context) {
|
466 |
+
return [];
|
467 |
+
}
|
468 |
+
waypoints = [];
|
469 |
+
$.each(context.waypoints[axis], function(i, waypoint) {
|
470 |
+
if (test(context, waypoint)) {
|
471 |
+
return waypoints.push(waypoint);
|
472 |
+
}
|
473 |
+
});
|
474 |
+
waypoints.sort(function(a, b) {
|
475 |
+
return a.offset - b.offset;
|
476 |
+
});
|
477 |
+
return $.map(waypoints, function(waypoint) {
|
478 |
+
return waypoint.element;
|
479 |
+
});
|
480 |
+
}
|
481 |
+
};
|
482 |
+
$[wps] = function() {
|
483 |
+
var args, method;
|
484 |
+
method = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
|
485 |
+
if (jQMethods[method]) {
|
486 |
+
return jQMethods[method].apply(null, args);
|
487 |
+
} else {
|
488 |
+
return jQMethods.aggregate.call(null, method);
|
489 |
+
}
|
490 |
+
};
|
491 |
+
$[wps].settings = {
|
492 |
+
resizeThrottle: 100,
|
493 |
+
scrollThrottle: 30
|
494 |
+
};
|
495 |
+
return $w.load(function() {
|
496 |
+
return $[wps]('refresh');
|
497 |
+
});
|
498 |
+
});
|
499 |
+
|
500 |
+
}).call(this);
|
501 |
+
|
502 |
+
|
includes/beta-testers.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
4 |
+
|
5 |
+
class PA_Beta_Testers {
|
6 |
+
private $transient_key;
|
7 |
+
private function get_beta_version() {
|
8 |
+
$beta_version = get_site_transient( $this->transient_key );
|
9 |
+
|
10 |
+
if ( false === $beta_version ) {
|
11 |
+
$beta_version = 'false';
|
12 |
+
|
13 |
+
$response = wp_remote_get( 'https://plugins.svn.wordpress.org/premium-addons-for-elementor/trunk/readme.txt' );
|
14 |
+
if ( ! is_wp_error( $response ) && ! empty( $response['body'] ) ) {
|
15 |
+
preg_match( '/Beta tag: (.*)/i', $response['body'], $matches );
|
16 |
+
if ( isset( $matches[1] ) ) {
|
17 |
+
$beta_version = $matches[1];
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
+
set_site_transient( $this->transient_key, $beta_version, 6 * HOUR_IN_SECONDS );
|
22 |
+
}
|
23 |
+
|
24 |
+
return $beta_version;
|
25 |
+
}
|
26 |
+
|
27 |
+
public function check_version( $transient ) {
|
28 |
+
if ( empty( $transient->checked ) ) {
|
29 |
+
return $transient;
|
30 |
+
}
|
31 |
+
|
32 |
+
delete_site_transient( $this->transient_key );
|
33 |
+
|
34 |
+
$plugin_slug = basename( PREMIUM_ADDONS_FILE , '.php' );
|
35 |
+
|
36 |
+
$beta_version = $this->get_beta_version();
|
37 |
+
if ( 'false' !== $beta_version && version_compare( $beta_version, PREMIUM_ADDONS_VERSION, '>' ) ) {
|
38 |
+
$response = new \stdClass();
|
39 |
+
$response->plugin = $plugin_slug;
|
40 |
+
$response->slug = $plugin_slug;
|
41 |
+
$response->new_version = $beta_version;
|
42 |
+
$response->url = 'https://premiumaddons.com/';
|
43 |
+
$response->package = sprintf( 'https://downloads.wordpress.org/plugin/premium-addons-for-elementor.%s.zip', $beta_version );
|
44 |
+
$transient->response[ PREMIUM_ADDONS_BASENAME ] = $response;
|
45 |
+
}
|
46 |
+
|
47 |
+
return $transient;
|
48 |
+
}
|
49 |
+
public function __construct() {
|
50 |
+
$check_component_active = get_option( 'pa_save_settings' );
|
51 |
+
if ( 0 !== $check_component_active['is-beta-tester'] ) {
|
52 |
+
return;
|
53 |
+
}
|
54 |
+
|
55 |
+
$this->transient_key = md5( 'premium_addons_beta_response_key' );
|
56 |
+
|
57 |
+
add_filter( 'pre_set_site_transient_update_plugins', [ $this, 'check_version' ] );
|
58 |
+
}
|
59 |
+
}
|
includes/maintenance.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if( !defined( 'ABSPATH' ) ) exit; //Exit if accessed directly
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Fire the rollback function
|
7 |
+
* @since 1.0
|
8 |
+
*/
|
9 |
+
function post_premium_addons_rollback() {
|
10 |
+
check_admin_referer( 'premium_addons_rollback' );
|
11 |
+
$plugin_slug = basename( PREMIUM_ADDONS_FILE, '.php' );
|
12 |
+
$pa_rollback = new PA_Rollback(
|
13 |
+
[
|
14 |
+
'version' => PREMIUM_ADDONS_STABLE_VERSION,
|
15 |
+
'plugin_name' => PREMIUM_ADDONS_BASENAME,
|
16 |
+
'plugin_slug' => $plugin_slug,
|
17 |
+
'package_url' => sprintf( 'https://downloads.wordpress.org/plugin/%s.%s.zip', $plugin_slug, PREMIUM_ADDONS_STABLE_VERSION ),
|
18 |
+
]
|
19 |
+
);
|
20 |
+
|
21 |
+
$pa_rollback->run();
|
22 |
+
|
23 |
+
wp_die(
|
24 |
+
'', __( 'Rollback to Previous Version', 'premium-addons-for-elementor' ), [
|
25 |
+
'response' => 200,
|
26 |
+
]
|
27 |
+
);
|
28 |
+
}
|
29 |
+
|
includes/rollback.php
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
4 |
+
|
5 |
+
class PA_Rollback {
|
6 |
+
protected $package_url;
|
7 |
+
protected $version;
|
8 |
+
protected $plugin_name;
|
9 |
+
protected $plugin_slug;
|
10 |
+
public function __construct( $args = [] ) {
|
11 |
+
foreach ( $args as $key => $value ) {
|
12 |
+
$this->{$key} = $value;
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
16 |
+
private function print_inline_style() {
|
17 |
+
?>
|
18 |
+
<style>
|
19 |
+
.wrap {
|
20 |
+
overflow: hidden;
|
21 |
+
}
|
22 |
+
|
23 |
+
h1 {
|
24 |
+
background: #6ec1e4;
|
25 |
+
text-align: center;
|
26 |
+
color: #fff !important;
|
27 |
+
padding: 70px !important;
|
28 |
+
text-transform: uppercase;
|
29 |
+
letter-spacing: 1px;
|
30 |
+
}
|
31 |
+
h1 img {
|
32 |
+
max-width: 300px;
|
33 |
+
display: block;
|
34 |
+
margin: auto auto 50px;
|
35 |
+
}
|
36 |
+
</style>
|
37 |
+
<?php
|
38 |
+
}
|
39 |
+
|
40 |
+
protected function apply_package() {
|
41 |
+
$update_plugins = get_site_transient( 'update_plugins' );
|
42 |
+
if ( ! is_object( $update_plugins ) ) {
|
43 |
+
|
44 |
+
$update_plugins = new \stdClass();
|
45 |
+
}
|
46 |
+
|
47 |
+
$plugin_info = new \stdClass();
|
48 |
+
$plugin_info->new_version = $this->version;
|
49 |
+
$plugin_info->slug = $this->plugin_slug;
|
50 |
+
$plugin_info->package = $this->package_url;
|
51 |
+
$plugin_info->url = 'https://premiumaddons.com/';
|
52 |
+
|
53 |
+
$update_plugins->response[ $this->plugin_name ] = $plugin_info;
|
54 |
+
|
55 |
+
set_site_transient( 'update_plugins', $update_plugins );
|
56 |
+
}
|
57 |
+
|
58 |
+
protected function upgrade() {
|
59 |
+
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
60 |
+
|
61 |
+
$logo_url = PREMIUM_ADDONS_URL . 'admin/images/premium-addons-logo.png';
|
62 |
+
|
63 |
+
$upgrader_args = [
|
64 |
+
'url' => 'update.php?action=upgrade-plugin&plugin=' . rawurlencode( $this->plugin_name ),
|
65 |
+
'plugin' => $this->plugin_name,
|
66 |
+
'nonce' => 'upgrade-plugin_' . $this->plugin_name,
|
67 |
+
'title' => '<img src="' . $logo_url . '" alt="Premium Addons">' . __( 'Rolling Back to Version ' . PREMIUM_ADDONS_STABLE_VERSION, 'elementor' ),
|
68 |
+
];
|
69 |
+
|
70 |
+
$this->print_inline_style();
|
71 |
+
|
72 |
+
$upgrader = new \Plugin_Upgrader( new \Plugin_Upgrader_Skin( $upgrader_args ) );
|
73 |
+
$upgrader->upgrade( $this->plugin_name );
|
74 |
+
}
|
75 |
+
|
76 |
+
public function run() {
|
77 |
+
$this->apply_package();
|
78 |
+
$this->upgrade();
|
79 |
+
}
|
80 |
+
}
|
premium-addons-for-elementor.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Premium Addons for Elementor
|
4 |
-
Description:
|
5 |
Plugin URI: https://premiumaddons.com
|
6 |
-
Version: 2.1.
|
7 |
Author: Leap13
|
8 |
Author URI: http://leap13.com/
|
9 |
Text Domain: premium-addons-for-elementor
|
@@ -22,12 +22,16 @@ if( !function_exists('add_action') ) {
|
|
22 |
|
23 |
if( !defined( 'ABSPATH' ) ) exit; // No access of directly access
|
24 |
|
|
|
25 |
define( 'PREMIUM_ADDONS_URL', plugins_url('/', __FILE__ ) );
|
26 |
define( 'PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
|
27 |
define( 'PREMIUM_ADDONS_FILE', __FILE__ );
|
|
|
|
|
|
|
28 |
|
29 |
/**
|
30 |
-
* Translating the
|
31 |
* assets
|
32 |
*/
|
33 |
add_action( 'plugins_loaded', 'premium_addons_elementor_setup');
|
@@ -37,7 +41,11 @@ define( 'PREMIUM_ADDONS_FILE', __FILE__ );
|
|
37 |
|
38 |
// Requires System Info When on Dashboard
|
39 |
if(is_admin()){
|
40 |
-
require_once(PREMIUM_ADDONS_PATH . 'includes/system-info.php');
|
|
|
|
|
|
|
|
|
41 |
}
|
42 |
|
43 |
// load the template tags
|
@@ -80,26 +88,25 @@ define( 'PREMIUM_ADDONS_FILE', __FILE__ );
|
|
80 |
}
|
81 |
}
|
82 |
};
|
83 |
-
|
84 |
class premium_Addon_Elementor {
|
85 |
|
86 |
/**
|
87 |
* Load all the hooks here
|
88 |
* @since 1.0
|
89 |
*/
|
90 |
-
|
91 |
public function __construct() {
|
92 |
-
|
93 |
add_action( 'elementor/widgets/widgets_registered', array( $this, 'premium_addons_widget_register') );
|
94 |
add_action( 'wp_enqueue_scripts', array( $this, 'premium_addons_required_assets' ) );
|
95 |
add_action( 'elementor/frontend/before_register_scripts', array($this, 'premium_addons_register_scripts'));
|
|
|
96 |
}
|
97 |
|
98 |
/**
|
99 |
* Load all frontend assets file such as stylesheet & javascript files
|
100 |
* @since 1.0
|
101 |
*/
|
102 |
-
|
103 |
public function premium_addons_required_assets() {
|
104 |
wp_enqueue_style( 'premium-addons-css', PREMIUM_ADDONS_URL . 'assets/css/premium-addons.css', array(), '1.0', 'all' );
|
105 |
$premium_maps_api = get_option( 'pa_save_settings' )['premium-map-api'];
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Premium Addons for Elementor
|
4 |
+
Description: Premium Addons Plugin Includes 20 premium widgets for Elementor Page Builder.
|
5 |
Plugin URI: https://premiumaddons.com
|
6 |
+
Version: 2.1.3
|
7 |
Author: Leap13
|
8 |
Author URI: http://leap13.com/
|
9 |
Text Domain: premium-addons-for-elementor
|
22 |
|
23 |
if( !defined( 'ABSPATH' ) ) exit; // No access of directly access
|
24 |
|
25 |
+
define( 'PREMIUM_ADDONS_VERSION', '2.1.3' );
|
26 |
define( 'PREMIUM_ADDONS_URL', plugins_url('/', __FILE__ ) );
|
27 |
define( 'PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
|
28 |
define( 'PREMIUM_ADDONS_FILE', __FILE__ );
|
29 |
+
define( 'PREMIUM_ADDONS_BASENAME', plugin_basename(__FILE__));
|
30 |
+
define( 'PREMIUM_ADDONS_STABLE_VERSION', '2.1.2');
|
31 |
+
|
32 |
|
33 |
/**
|
34 |
+
* Translating the plugin and load some
|
35 |
* assets
|
36 |
*/
|
37 |
add_action( 'plugins_loaded', 'premium_addons_elementor_setup');
|
41 |
|
42 |
// Requires System Info When on Dashboard
|
43 |
if(is_admin()){
|
44 |
+
require_once( PREMIUM_ADDONS_PATH . 'includes/system-info.php' );
|
45 |
+
require_once( PREMIUM_ADDONS_PATH . 'includes/maintenance.php' );
|
46 |
+
require_once( PREMIUM_ADDONS_PATH . 'includes/rollback.php' );
|
47 |
+
require_once( PREMIUM_ADDONS_PATH . 'includes/beta-testers.php' );
|
48 |
+
$beta_testers = new PA_Beta_Testers();
|
49 |
}
|
50 |
|
51 |
// load the template tags
|
88 |
}
|
89 |
}
|
90 |
};
|
91 |
+
|
92 |
class premium_Addon_Elementor {
|
93 |
|
94 |
/**
|
95 |
* Load all the hooks here
|
96 |
* @since 1.0
|
97 |
*/
|
|
|
98 |
public function __construct() {
|
99 |
+
add_action( 'elementor/init', array( $this, 'initiate_elementor_addons' ) );
|
100 |
add_action( 'elementor/widgets/widgets_registered', array( $this, 'premium_addons_widget_register') );
|
101 |
add_action( 'wp_enqueue_scripts', array( $this, 'premium_addons_required_assets' ) );
|
102 |
add_action( 'elementor/frontend/before_register_scripts', array($this, 'premium_addons_register_scripts'));
|
103 |
+
add_action( 'admin_post_premium_addons_rollback', 'post_premium_addons_rollback');
|
104 |
}
|
105 |
|
106 |
/**
|
107 |
* Load all frontend assets file such as stylesheet & javascript files
|
108 |
* @since 1.0
|
109 |
*/
|
|
|
110 |
public function premium_addons_required_assets() {
|
111 |
wp_enqueue_style( 'premium-addons-css', PREMIUM_ADDONS_URL . 'assets/css/premium-addons.css', array(), '1.0', 'all' );
|
112 |
$premium_maps_api = get_option( 'pa_save_settings' )['premium-map-api'];
|
readme.txt
CHANGED
@@ -98,6 +98,12 @@ Premium Addons for Elementor is light weight and we also gave you the control to
|
|
98 |
|
99 |
== Changelog ==
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
= 2.1.2 =
|
102 |
|
103 |
- Fix: Premium Fancy Text Slide up effect bug on Chrome and Opera.
|
98 |
|
99 |
== Changelog ==
|
100 |
|
101 |
+
= 2.1.3 =
|
102 |
+
|
103 |
+
- New: Added Version Control tab to plugin settings including Version Rollback option and an option to enable beta versions updates.
|
104 |
+
- Tweak: Added Custom/Existing page link option for Premium Dual Heading Widget.
|
105 |
+
- Tweak: Changed Addons icons hover color.
|
106 |
+
|
107 |
= 2.1.2 =
|
108 |
|
109 |
- Fix: Premium Fancy Text Slide up effect bug on Chrome and Opera.
|
widgets/premium-blog.php
CHANGED
@@ -807,4 +807,4 @@ if(count($posts)){
|
|
807 |
<?php
|
808 |
}
|
809 |
}
|
810 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Blog_Widget());
|
807 |
<?php
|
808 |
}
|
809 |
}
|
810 |
+
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Blog_Widget());
|
widgets/premium-carousel.php
CHANGED
@@ -984,4 +984,4 @@ class Premium_Carousel_Widget extends Widget_Base {
|
|
984 |
|
985 |
}
|
986 |
}
|
987 |
-
Plugin::instance()->widgets_manager->register_widget_type( new Premium_Carousel_Widget() );
|
984 |
|
985 |
}
|
986 |
}
|
987 |
+
Plugin::instance()->widgets_manager->register_widget_type( new Premium_Carousel_Widget() );
|
widgets/premium-countdown.php
CHANGED
@@ -539,4 +539,4 @@ class Premium_Counter_Down_Widget extends Widget_Base {
|
|
539 |
|
540 |
}
|
541 |
|
542 |
-
Plugin::instance()->widgets_manager->register_widget_type( new Premium_Counter_Down_Widget() );
|
539 |
|
540 |
}
|
541 |
|
542 |
+
Plugin::instance()->widgets_manager->register_widget_type( new Premium_Counter_Down_Widget() );
|
widgets/premium-dual-header.php
CHANGED
@@ -5,6 +5,12 @@ if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
|
5 |
|
6 |
class Premium_Dual_Header_Widget extends Widget_Base
|
7 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
public function get_name() {
|
9 |
return 'premium-addon-dual-header';
|
10 |
}
|
@@ -13,6 +19,7 @@ class Premium_Dual_Header_Widget extends Widget_Base
|
|
13 |
return esc_html__('Premium Dual Heading', 'premium-addons-for-elementor');
|
14 |
}
|
15 |
|
|
|
16 |
public function get_icon() {
|
17 |
return 'pa-dual-header';
|
18 |
}
|
@@ -105,6 +112,61 @@ class Premium_Dual_Header_Widget extends Widget_Base
|
|
105 |
]
|
106 |
);
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
/*Text Align*/
|
109 |
$this->add_responsive_control('premium_dual_header_text_align',
|
110 |
[
|
@@ -424,11 +486,23 @@ class Premium_Dual_Header_Widget extends Widget_Base
|
|
424 |
$full_first_title_tag = '<' . $first_title_tag . ' class="premium-dual-header-first-header ' . $first_clip . '"><span '. $this->get_render_attribute_string('premium_dual_header_first_header_text') . '>' . $first_title_text . '</span></' . $settings['premium_dual_header_first_header_tag'] . '> ';
|
425 |
|
426 |
$full_second_title_tag = '<' . $second_title_tag . ' class="premium-dual-header-second-header ' . $second_clip . '"><span '. $this->get_render_attribute_string('premium_dual_header_second_header_text'). '>' . $second_title_text . '</span></' . $settings['premium_dual_header_second_header_tag'] . '>';
|
|
|
|
|
|
|
|
|
|
|
|
|
427 |
?>
|
428 |
|
429 |
<div class="premium-dual-header-container">
|
|
|
|
|
|
|
430 |
<div class="premium-dual-header-first-container"><?php if ( !empty ( $settings['premium_dual_header_first_header_text'] ) ) : echo $full_first_title_tag; endif; ?></div>
|
431 |
<div class="premium-dual-header-second-container"><?php if ( !empty ( $settings['premium_dual_header_second_header_text'] ) ) : echo $full_second_title_tag; endif; ?></div>
|
|
|
|
|
|
|
432 |
</div>
|
433 |
|
434 |
<?php
|
5 |
|
6 |
class Premium_Dual_Header_Widget extends Widget_Base
|
7 |
{
|
8 |
+
protected $templateInstance;
|
9 |
+
|
10 |
+
public function getTemplateInstance(){
|
11 |
+
return $this->templateInstance = premium_Template_Tags::getInstance();
|
12 |
+
}
|
13 |
+
|
14 |
public function get_name() {
|
15 |
return 'premium-addon-dual-header';
|
16 |
}
|
19 |
return esc_html__('Premium Dual Heading', 'premium-addons-for-elementor');
|
20 |
}
|
21 |
|
22 |
+
|
23 |
public function get_icon() {
|
24 |
return 'pa-dual-header';
|
25 |
}
|
112 |
]
|
113 |
);
|
114 |
|
115 |
+
$this->add_control('premium_dual_header_link_switcher',
|
116 |
+
[
|
117 |
+
'label' => esc_html__('Link', 'premium-addons-for-elementor'),
|
118 |
+
'type' => Controls_Manager::SWITCHER,
|
119 |
+
'description' => esc_html__('Enable or disable link','premium-addons-for-elementor'),
|
120 |
+
]
|
121 |
+
);
|
122 |
+
|
123 |
+
$this->add_control('premium_dual_heading_link_selection',
|
124 |
+
[
|
125 |
+
'label' => esc_html__('Link Type', 'premium-addons-for-elementor'),
|
126 |
+
'type' => Controls_Manager::SELECT,
|
127 |
+
'options' => [
|
128 |
+
'url' => esc_html__('URL', 'premium-addons-for-elementor'),
|
129 |
+
'link' => esc_html__('Existing Page', 'premium-addons-for-elementor'),
|
130 |
+
],
|
131 |
+
'default' => 'url',
|
132 |
+
'label_block' => true,
|
133 |
+
'condition' => [
|
134 |
+
'premium_dual_header_link_switcher' => 'yes',
|
135 |
+
]
|
136 |
+
]
|
137 |
+
);
|
138 |
+
|
139 |
+
$this->add_control('premium_dual_heading_link',
|
140 |
+
[
|
141 |
+
'label' => esc_html__('Link', 'premium-addons-for-elementor'),
|
142 |
+
'type' => Controls_Manager::URL,
|
143 |
+
'default' => [
|
144 |
+
'url' => '#',
|
145 |
+
],
|
146 |
+
'placeholder' => 'https://premiumaddons.com/',
|
147 |
+
'label_block' => true,
|
148 |
+
'separator' => 'after',
|
149 |
+
'condition' => [
|
150 |
+
'premium_dual_header_link_switcher' => 'yes',
|
151 |
+
'premium_dual_heading_link_selection' => 'url'
|
152 |
+
]
|
153 |
+
]
|
154 |
+
);
|
155 |
+
|
156 |
+
$this->add_control('premium_dual_heading_existing_link',
|
157 |
+
[
|
158 |
+
'label' => esc_html__('Existing Page', 'premium-addons-for-elementor'),
|
159 |
+
'type' => Controls_Manager::SELECT,
|
160 |
+
'options' => $this->getTemplateInstance()->get_all_post(),
|
161 |
+
'condition' => [
|
162 |
+
'premium_dual_header_link_switcher' => 'yes',
|
163 |
+
'premium_dual_heading_link_selection' => 'link',
|
164 |
+
],
|
165 |
+
'separator' => 'after',
|
166 |
+
'label_block' => true,
|
167 |
+
]
|
168 |
+
);
|
169 |
+
|
170 |
/*Text Align*/
|
171 |
$this->add_responsive_control('premium_dual_header_text_align',
|
172 |
[
|
486 |
$full_first_title_tag = '<' . $first_title_tag . ' class="premium-dual-header-first-header ' . $first_clip . '"><span '. $this->get_render_attribute_string('premium_dual_header_first_header_text') . '>' . $first_title_text . '</span></' . $settings['premium_dual_header_first_header_tag'] . '> ';
|
487 |
|
488 |
$full_second_title_tag = '<' . $second_title_tag . ' class="premium-dual-header-second-header ' . $second_clip . '"><span '. $this->get_render_attribute_string('premium_dual_header_second_header_text'). '>' . $second_title_text . '</span></' . $settings['premium_dual_header_second_header_tag'] . '>';
|
489 |
+
|
490 |
+
if( $settings['premium_dual_header_link_switcher'] =='yes' && $settings['premium_dual_heading_link_selection'] == 'link' ) {
|
491 |
+
$link = get_permalink($settings['premium_dual_heading_existing_link']);
|
492 |
+
} elseif( $settings['premium_dual_header_link_switcher'] =='yes' && $settings['premium_dual_heading_link_selection'] == 'url' ){
|
493 |
+
$link = $settings['premium_dual_heading_link']['url'];
|
494 |
+
}
|
495 |
?>
|
496 |
|
497 |
<div class="premium-dual-header-container">
|
498 |
+
<?php if( $settings['premium_dual_header_link_switcher'] == 'yes' && ( !empty( $settings['premium_dual_heading_link']['url'] ) || !empty( $settings['premium_dual_heading_existing_link'] ) ) ) : ?>
|
499 |
+
<a <?php if( !empty( $link ) ) : ?> href="<?php echo esc_attr($link); ?>" <?php endif; ?> <?php if(!empty($settings['premium_dual_heading_link']['is_external'])) : ?>target="_blank"<?php endif; ?><?php if(!empty($settings['premium_dual_heading_link']['nofollow'])) : ?>rel="nofollow"<?php endif; ?>>
|
500 |
+
<?php endif; ?>
|
501 |
<div class="premium-dual-header-first-container"><?php if ( !empty ( $settings['premium_dual_header_first_header_text'] ) ) : echo $full_first_title_tag; endif; ?></div>
|
502 |
<div class="premium-dual-header-second-container"><?php if ( !empty ( $settings['premium_dual_header_second_header_text'] ) ) : echo $full_second_title_tag; endif; ?></div>
|
503 |
+
<?php if( $settings['premium_dual_header_link_switcher'] == 'yes' && ( !empty( $settings['premium_dual_heading_link']['url'] ) || !empty( $settings['premium_dual_heading_existing_link'] ) ) ) : ?>
|
504 |
+
</a>
|
505 |
+
<?php endif; ?>
|
506 |
</div>
|
507 |
|
508 |
<?php
|
widgets/premium-image-button.php
CHANGED
@@ -764,4 +764,4 @@ class Premium_Image_Button_Widget extends Widget_Base
|
|
764 |
<?php
|
765 |
}
|
766 |
}
|
767 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Image_Button_Widget());
|
764 |
<?php
|
765 |
}
|
766 |
}
|
767 |
+
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Image_Button_Widget());
|
widgets/premium-imageseparator.php
CHANGED
@@ -228,4 +228,4 @@ class Premium_Image_Separator_Widget extends Widget_Base
|
|
228 |
<?php
|
229 |
}
|
230 |
}
|
231 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Image_Separator_Widget());
|
228 |
<?php
|
229 |
}
|
230 |
}
|
231 |
+
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Image_Separator_Widget());
|
widgets/premium-modalbox.php
CHANGED
@@ -1039,4 +1039,4 @@ class Premium_Modal_Box_Widget extends Widget_Base
|
|
1039 |
<?php
|
1040 |
}
|
1041 |
}
|
1042 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Modal_Box_Widget());
|
1039 |
<?php
|
1040 |
}
|
1041 |
}
|
1042 |
+
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Modal_Box_Widget());
|
widgets/premium-person.php
CHANGED
@@ -547,4 +547,4 @@ class Premium_Person_Widget extends Widget_Base
|
|
547 |
<?php
|
548 |
}
|
549 |
}
|
550 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Person_Widget());
|
547 |
<?php
|
548 |
}
|
549 |
}
|
550 |
+
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Person_Widget());
|
widgets/premium-pricing-table.php
CHANGED
@@ -1825,4 +1825,4 @@ class Premium_Pricing_Table_Widget extends Widget_Base
|
|
1825 |
<?php
|
1826 |
}
|
1827 |
}
|
1828 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Pricing_Table_Widget());
|
1825 |
<?php
|
1826 |
}
|
1827 |
}
|
1828 |
+
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Pricing_Table_Widget());
|
widgets/premium-testimonials.php
CHANGED
@@ -545,4 +545,4 @@ class Premium_Testimonials_Widget extends Widget_Base
|
|
545 |
<?php
|
546 |
}
|
547 |
}
|
548 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Testimonials_Widget());
|
545 |
<?php
|
546 |
}
|
547 |
}
|
548 |
+
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Testimonials_Widget());
|
widgets/premium-title.php
CHANGED
@@ -568,4 +568,4 @@ class Premium_Title_Widget extends Widget_Base
|
|
568 |
<?php
|
569 |
}
|
570 |
}
|
571 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Title_Widget());
|
568 |
<?php
|
569 |
}
|
570 |
}
|
571 |
+
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Title_Widget());
|
widgets/premium-videobox.php
CHANGED
@@ -559,4 +559,4 @@ class Premium_Video_Box_Widget extends Widget_Base
|
|
559 |
<?php
|
560 |
}
|
561 |
}
|
562 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Video_Box_Widget());
|
559 |
<?php
|
560 |
}
|
561 |
}
|
562 |
+
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Video_Box_Widget());
|