Version Description
- Tweak: Premium Testimonials widget performance enhanced.
- Tweak: Plugin core enhancement for faster performance.
- Fixed: Conflict with 'Pods Custom Content Types and Fields' plugin.
Download this release
Release Info
Developer | leap13 |
Plugin | Premium Addons for Elementor |
Version | 2.6.7 |
Comparing to | |
See all releases |
Code changes from version 2.6.6 to 2.6.7
- admin/assets/admin.css +1 -365
- admin/assets/admin.js +0 -1
- admin/assets/js/sweetalert2/{js/core.js → core.js} +0 -0
- admin/assets/js/sweetalert2/{css/sweetalert2.min.css → sweetalert2.min.css} +0 -0
- admin/assets/js/sweetalert2/{js/sweetalert2.min.js → sweetalert2.min.js} +0 -0
- admin/includes/notices.php +254 -0
- admin/settings/about.php +4 -12
- admin/settings/elements.php +73 -66
- admin/settings/gomaps.php +17 -4
- admin/settings/gopro.php +2 -18
- admin/settings/version-control.php +3 -4
- elementor-helper.php +1 -1
- includes/class-addons-category.php +49 -0
- includes/class-addons-integration.php +241 -0
- includes/{beta-testers.php → class-beta-testers.php} +1 -1
- premium-addons-for-elementor.php +125 -468
- readme.txt +10 -5
- widgets/premium-banner.php +2 -4
- widgets/premium-blog.php +5 -11
- widgets/premium-button.php +2 -4
- widgets/premium-carousel.php +2 -3
- widgets/premium-contactform.php +10 -13
- widgets/premium-countdown.php +2 -4
- widgets/premium-counter.php +3 -5
- widgets/premium-dual-header.php +2 -4
- widgets/premium-fancytext.php +2 -4
- widgets/premium-grid.php +2 -3
- widgets/premium-image-button.php +2 -4
- widgets/{premium-imageseparator.php → premium-image-separator.php} +2 -4
- widgets/premium-maps.php +2 -4
- widgets/premium-modalbox.php +2 -4
- widgets/premium-person.php +2 -4
- widgets/premium-pricing-table.php +2 -4
- widgets/premium-progressbar.php +2 -4
- widgets/premium-testimonials.php +94 -45
- widgets/premium-title.php +2 -5
- widgets/premium-videobox.php +2 -4
admin/assets/admin.css
CHANGED
@@ -1,365 +1 @@
|
|
1 |
-
.pa-header-wrapper {
|
2 |
-
padding: 20px;
|
3 |
-
overflow: hidden;
|
4 |
-
}
|
5 |
-
.pa-title-left {
|
6 |
-
width: 80%;
|
7 |
-
float: left;
|
8 |
-
}
|
9 |
-
h1.pa-title-main {
|
10 |
-
padding: 0;
|
11 |
-
line-height: 1.3em;
|
12 |
-
font-size: 42px;
|
13 |
-
margin-top: 5px;
|
14 |
-
}
|
15 |
-
.pa-title-sub {
|
16 |
-
color:#777;
|
17 |
-
font-weight: normal;
|
18 |
-
margin-left: 3px;
|
19 |
-
}
|
20 |
-
.pa-title-right {
|
21 |
-
float: right;
|
22 |
-
}
|
23 |
-
.pa-title-right img {
|
24 |
-
width: 100px;
|
25 |
-
height: 100px;
|
26 |
-
}
|
27 |
-
.button.pa-btn {
|
28 |
-
border: none;
|
29 |
-
color: #fff;
|
30 |
-
text-align: center;
|
31 |
-
padding: 3px;
|
32 |
-
max-width: 250px;
|
33 |
-
height: auto;
|
34 |
-
margin-bottom: 15px;
|
35 |
-
display: block;
|
36 |
-
font-weight: bold;
|
37 |
-
box-shadow: none;
|
38 |
-
}
|
39 |
-
.pa-btn.pa-save-button {
|
40 |
-
background-color: #1A7FC2;
|
41 |
-
margin-bottom: 0;
|
42 |
-
margin-top: 30px;
|
43 |
-
padding: 3px 10px;
|
44 |
-
}
|
45 |
-
.pa-btn.pa-save-button:hover {
|
46 |
-
background: #0e629a;
|
47 |
-
color: #fff;
|
48 |
-
}
|
49 |
-
|
50 |
-
.pa-btn.pa-save-button:focus {
|
51 |
-
background: #0e629a;
|
52 |
-
color: #fff;
|
53 |
-
}
|
54 |
-
|
55 |
-
.pa-settings-tabs-list {
|
56 |
-
margin: 0;
|
57 |
-
border-bottom: 1px solid #ccc;
|
58 |
-
}
|
59 |
-
/*About Settings Tab*/
|
60 |
-
.pa-settings-tabs-list li {
|
61 |
-
display: inline-block;
|
62 |
-
margin-bottom: 4px;
|
63 |
-
margin-left: 0.5em;
|
64 |
-
}
|
65 |
-
.pa-tab-list-item {
|
66 |
-
background: #e5e5e5;
|
67 |
-
padding: 9px 15px;
|
68 |
-
line-height: 30px;
|
69 |
-
font-size: 18px;
|
70 |
-
font-weight: bold;
|
71 |
-
color: #444;
|
72 |
-
text-decoration: none;
|
73 |
-
border: 1px solid #ccc;
|
74 |
-
border-bottom: none;
|
75 |
-
}
|
76 |
-
.pa-tab-list-item:focus {
|
77 |
-
box-shadow: none;
|
78 |
-
}
|
79 |
-
li.ui-state-default:not(.ui-state-active):hover a {
|
80 |
-
background: #fff;
|
81 |
-
color: #444;
|
82 |
-
}
|
83 |
-
li.ui-state-active a{
|
84 |
-
outline: none;
|
85 |
-
color: black;
|
86 |
-
background: transparent;
|
87 |
-
box-shadow: none;
|
88 |
-
border-bottom: 1px solid #f1f1f1;
|
89 |
-
}
|
90 |
-
.pa-row {
|
91 |
-
width: 100%;
|
92 |
-
overflow: hidden;
|
93 |
-
}
|
94 |
-
.pa-settings-tabs {
|
95 |
-
padding: 15px 25px;
|
96 |
-
margin-top: -3em;
|
97 |
-
}
|
98 |
-
#pa-about {
|
99 |
-
margin-top: 50px;
|
100 |
-
}
|
101 |
-
.pa-col-half {
|
102 |
-
width: 40%;
|
103 |
-
height: auto;
|
104 |
-
float: left;
|
105 |
-
}
|
106 |
-
.pa-about-panel {
|
107 |
-
width: 100%;
|
108 |
-
display: inline-block;
|
109 |
-
margin-bottom: 20px;
|
110 |
-
}
|
111 |
-
.pa-icon-container {
|
112 |
-
float: left;
|
113 |
-
display: inline-block;
|
114 |
-
width: 45px;
|
115 |
-
}
|
116 |
-
.pa-icon-container i {
|
117 |
-
font-size: 25px;
|
118 |
-
}
|
119 |
-
.pa-text-container {
|
120 |
-
display: inline-block;
|
121 |
-
width: 80%;
|
122 |
-
}
|
123 |
-
.pa-text-container h4 {
|
124 |
-
margin: 0;
|
125 |
-
font-weight: normal;
|
126 |
-
font-size: 18px;
|
127 |
-
}
|
128 |
-
.pa-text-container p {
|
129 |
-
line-height: 22px;
|
130 |
-
color: #444;
|
131 |
-
font-size: 13px;
|
132 |
-
margin: 1em 0;
|
133 |
-
}
|
134 |
-
/*Elements Settings Tab*/
|
135 |
-
.pa-elements-table {
|
136 |
-
border-collapse: collapse;
|
137 |
-
margin-top: 0.5em;
|
138 |
-
margin-left: 5px;
|
139 |
-
width: 80%;
|
140 |
-
clear: both;
|
141 |
-
}
|
142 |
-
.pa-elements-table th {
|
143 |
-
vertical-align: top;
|
144 |
-
text-align: left;
|
145 |
-
padding: 20px 10px 20px 0;
|
146 |
-
width: 200px;
|
147 |
-
line-height: 1.3;
|
148 |
-
font-weight: 600;
|
149 |
-
}
|
150 |
-
.pa-elements-table tr {
|
151 |
-
border-bottom: 1px solid #ddd;
|
152 |
-
}
|
153 |
-
.pa-elements-table td {
|
154 |
-
margin-bottom: 9px;
|
155 |
-
padding: 15px 10px;
|
156 |
-
line-height: 1.3;
|
157 |
-
vertical-align: middle;
|
158 |
-
}
|
159 |
-
.pa-elements-table .pa-element-desc {
|
160 |
-
font-weight: 300;
|
161 |
-
padding-bottom: 1.5em;
|
162 |
-
border-bottom: 1px solid #ddd;
|
163 |
-
}
|
164 |
-
/* The switch - the box around the slider */
|
165 |
-
.switch {
|
166 |
-
position: relative;
|
167 |
-
display: inline-block;
|
168 |
-
width: 70px;
|
169 |
-
height: 33px;
|
170 |
-
}
|
171 |
-
/* Hide default HTML checkbox */
|
172 |
-
.switch input {
|
173 |
-
display:none;
|
174 |
-
}
|
175 |
-
/* The slider */
|
176 |
-
.slider,
|
177 |
-
.pro-slider {
|
178 |
-
position: absolute;
|
179 |
-
cursor: pointer;
|
180 |
-
top: 0;
|
181 |
-
left: 0;
|
182 |
-
right: 0;
|
183 |
-
bottom: 0;
|
184 |
-
background-color: rgb(242,242,242);
|
185 |
-
box-shadow: 0 0 2px 1px #ccc inset;
|
186 |
-
-webkit-transition: .4s;
|
187 |
-
transition: .4s;
|
188 |
-
}
|
189 |
-
.slider:before,
|
190 |
-
.pro-slider:before {
|
191 |
-
position: absolute;
|
192 |
-
content: "";
|
193 |
-
height: 27.5px;
|
194 |
-
width: 27.5px;
|
195 |
-
left: 0px;
|
196 |
-
bottom: 1.1px;
|
197 |
-
background: radial-gradient(farthest-corner at 14px 0px,
|
198 |
-
rgb(240,240,240) 50%, rgb(202,202,202) 100%);
|
199 |
-
-webkit-transition: .4s;
|
200 |
-
transition: .4s;
|
201 |
-
padding: 0;
|
202 |
-
margin: 0;
|
203 |
-
border: 1px solid rgb(198,198,198);
|
204 |
-
box-shadow: 0px 2.5px 5px rgb(184,184,185);
|
205 |
-
}
|
206 |
-
input:checked + .slider {
|
207 |
-
background-color: rgb(24,164,253);
|
208 |
-
box-shadow: 0 0 2px 1px rgb(20,154,253) inset;
|
209 |
-
border: 1px solid rgb(20,154,253);
|
210 |
-
}
|
211 |
-
input:focus + .slider {
|
212 |
-
box-shadow: 0 0 1px rgb(24,164,253);
|
213 |
-
}
|
214 |
-
input:checked + .slider:before {
|
215 |
-
box-shadow: 0px 2.5px 5px #0d6fbd;
|
216 |
-
border: 1px solid #0d6fbd;
|
217 |
-
-webkit-transform: translateX(40px);
|
218 |
-
-ms-transform: translateX(40px);
|
219 |
-
transform: translateX(40px);
|
220 |
-
}
|
221 |
-
|
222 |
-
/* Rounded sliders */
|
223 |
-
.slider.round,
|
224 |
-
.pro-slider.round {
|
225 |
-
border: 1px solid rgb(184,184,185);
|
226 |
-
border-radius: 34px;
|
227 |
-
}
|
228 |
-
.slider.round:before,
|
229 |
-
.pro-slider.round:before {
|
230 |
-
border-radius: 50%;
|
231 |
-
}
|
232 |
-
.pa-maps-table {
|
233 |
-
text-align: left;
|
234 |
-
}
|
235 |
-
.pa-api-title {
|
236 |
-
display: inline-block;
|
237 |
-
margin: 0;
|
238 |
-
}
|
239 |
-
.pa-api-disable-title label,
|
240 |
-
.pa-is-beta label{
|
241 |
-
margin-right: 15px;
|
242 |
-
}
|
243 |
-
.pa-api-disable-title span,
|
244 |
-
.pa-is-beta span{
|
245 |
-
font-weight: normal;
|
246 |
-
}
|
247 |
-
.pa-maps-api-notice {
|
248 |
-
margin: 10px 0 0 0;
|
249 |
-
}
|
250 |
-
.pa-api-title input {
|
251 |
-
margin-top: 10px;
|
252 |
-
font-size: normal;
|
253 |
-
font-weight: normal;
|
254 |
-
width: 400px;
|
255 |
-
margin-left: 30px;
|
256 |
-
}
|
257 |
-
#pa-maintenance {
|
258 |
-
margin-top: 30px;
|
259 |
-
}
|
260 |
-
.pa-beta-table tr {
|
261 |
-
text-align: left;
|
262 |
-
}
|
263 |
-
.pa-roll-back,
|
264 |
-
.pa-beta-test{
|
265 |
-
text-align: left;
|
266 |
-
font-size: 20px;
|
267 |
-
font-weight: normal;
|
268 |
-
margin-top: 15px;
|
269 |
-
margin-bottom: 10px;
|
270 |
-
}
|
271 |
-
.pa-beta-test {
|
272 |
-
margin-top: 0;
|
273 |
-
}
|
274 |
-
.pa-roll-back-span,
|
275 |
-
.pa-beta-test-span{
|
276 |
-
line-height: 22px;
|
277 |
-
color: #444;
|
278 |
-
font-size: 13px;
|
279 |
-
margin: 0;
|
280 |
-
font-weight: normal;
|
281 |
-
}
|
282 |
-
.pa-roll-row,
|
283 |
-
.pa-beta-row{
|
284 |
-
float: left;
|
285 |
-
}
|
286 |
-
.pa-beta-row{
|
287 |
-
margin-top: 13px;
|
288 |
-
}
|
289 |
-
.pa-roll-row th,
|
290 |
-
.pa-beta-row th{
|
291 |
-
vertical-align: top;
|
292 |
-
text-align: left;
|
293 |
-
padding: 20px 10px 20px 0;
|
294 |
-
width: 200px;
|
295 |
-
line-height: 1.3;
|
296 |
-
}
|
297 |
-
.pa-roll-row td{
|
298 |
-
padding: 15px 10px;
|
299 |
-
}
|
300 |
-
.pa-beta-row td{
|
301 |
-
padding: 22px 10px;
|
302 |
-
}
|
303 |
-
.pa-roll-row .pa-rollback-button {
|
304 |
-
box-shadow: 0 1px 0 #ccc;
|
305 |
-
color: #555;
|
306 |
-
border: 1px solid #ccc;
|
307 |
-
background: #f7f7f7;
|
308 |
-
vertical-align: top;
|
309 |
-
margin: 0;
|
310 |
-
padding: 0 10px 1px;
|
311 |
-
}
|
312 |
-
.pa-roll-row .pa-rollback-button:hover {
|
313 |
-
background: #fafafa;
|
314 |
-
border-color: #999;
|
315 |
-
color: #23282d;
|
316 |
-
}
|
317 |
-
.pa-roll-row .pa-roll-desc{
|
318 |
-
font-style: italic;
|
319 |
-
color: red;
|
320 |
-
margin-top: 4px;
|
321 |
-
}
|
322 |
-
.pa-beta-row .pa-beta-desc{
|
323 |
-
font-style: italic;
|
324 |
-
margin-top: 4px;
|
325 |
-
}
|
326 |
-
.pa-sys-info-tab {
|
327 |
-
background: #f7f7f7;
|
328 |
-
margin: 8px;
|
329 |
-
border: 2px solid #ddd;
|
330 |
-
border-radius: 3px;
|
331 |
-
padding: 0;
|
332 |
-
}
|
333 |
-
.pa-system-info-container {
|
334 |
-
padding: 10px;
|
335 |
-
}
|
336 |
-
.pa-sys-info-tab .pa-sys-info-title {
|
337 |
-
margin: 0;
|
338 |
-
margin-bottom: 0px;
|
339 |
-
padding: 10px;
|
340 |
-
border-bottom: 2px solid #ddd;
|
341 |
-
background: #fff;
|
342 |
-
margin-bottom: 10px;
|
343 |
-
font-weight: 500;
|
344 |
-
}
|
345 |
-
tr.pa-sec-elems-tr {
|
346 |
-
border: none;
|
347 |
-
}
|
348 |
-
tr.pa-sec-elems-tr th {
|
349 |
-
padding-bottom: 0;
|
350 |
-
}
|
351 |
-
tr.pa-sec-elems-tr th h1{
|
352 |
-
font-weight: bold;
|
353 |
-
font-size: 25px;
|
354 |
-
letter-spacing: 1px;
|
355 |
-
color: #555;
|
356 |
-
margin-bottom: 0;
|
357 |
-
}
|
358 |
-
.pa-swal-head {
|
359 |
-
display: block;
|
360 |
-
margin-bottom: 20px;
|
361 |
-
}
|
362 |
-
.pa-swal-desc {
|
363 |
-
font-weight: bold;
|
364 |
-
color: #0f6aa7;
|
365 |
-
}
|
1 |
+
.pa-header-wrapper{padding:20px;overflow:hidden}.pa-title-left{width:80%;float:left}h1.pa-title-main{padding:0;line-height:1.3em;font-size:42px;margin-top:5px}.pa-title-sub{color:#777;font-weight:400;margin-left:3px}.pa-title-right{float:right}.pa-title-right img{width:100px;height:100px}.button.pa-btn{border:none;color:#fff;text-align:center;padding:3px;max-width:250px;height:auto;margin-bottom:15px;display:block;font-weight:700;box-shadow:none}.pa-btn.pa-save-button{background-color:#1A7FC2;margin-bottom:0;margin-top:30px;padding:3px 10px}.pa-btn.pa-save-button:hover{background:#0e629a;color:#fff}.pa-btn.pa-save-button:focus{background:#0e629a;color:#fff}.pa-settings-tabs-list{margin:0;border-bottom:1px solid #ccc}.pa-settings-tabs-list li{display:inline-block;margin-bottom:4px;margin-left:.5em}.pa-tab-list-item{background:#e5e5e5;padding:9px 15px;line-height:30px;font-size:18px;font-weight:700;color:#444;text-decoration:none;border:1px solid #ccc;border-bottom:none}.pa-tab-list-item:focus{box-shadow:none}li.ui-state-default:not(.ui-state-active):hover a{background:#fff;color:#444}li.ui-state-active a{outline:none;color:#000;background:transparent;box-shadow:none;border-bottom:1px solid #f1f1f1}.pa-row{width:100%;overflow:hidden}.pa-settings-tabs{padding:15px 25px;margin-top:-3em}#pa-about{margin-top:50px}.pa-col-half{width:40%;height:auto;float:left}.pa-about-panel{width:100%;display:inline-block;margin-bottom:20px}.pa-icon-container{float:left;display:inline-block;width:45px}.pa-icon-container i{font-size:25px}.pa-text-container{display:inline-block;width:80%}.pa-text-container h4{margin:0;font-weight:400;font-size:18px}.pa-text-container p{line-height:22px;color:#444;font-size:13px;margin:1em 0}.pa-elements-table{border-collapse:collapse;margin-top:.5em;margin-left:5px;width:80%;clear:both}.pa-elements-table th{vertical-align:top;text-align:left;padding:20px 10px 20px 0;width:200px;line-height:1.3;font-weight:600}.pa-elements-table tr{border-bottom:1px solid #ddd}.pa-elements-table td{margin-bottom:9px;padding:15px 10px;line-height:1.3;vertical-align:middle}.pa-elements-table .pa-element-desc{font-weight:300;padding-bottom:1.5em;border-bottom:1px solid #ddd}.switch{position:relative;display:inline-block;width:70px;height:33px}.switch input{display:none}.slider,.pro-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#f2f2f2;box-shadow:0 0 2px 1px #ccc inset;-webkit-transition:.4s;transition:.4s}.slider:before,.pro-slider:before{position:absolute;content:"";height:27.5px;width:27.5px;left:0;bottom:1.1px;background:radial-gradient(farthest-corner at 14px 0px,#f0f0f0 50%,#cacaca 100%);-webkit-transition:.4s;transition:.4s;padding:0;margin:0;border:1px solid #c6c6c6;box-shadow:0 2.5px 5px #b8b8b9}input:checked + .slider{background-color:#18a4fd;box-shadow:0 0 2px 1px #149afd inset;border:1px solid #149afd}input:focus + .slider{box-shadow:0 0 1px #18a4fd}input:checked + .slider:before{box-shadow:0 2.5px 5px #0d6fbd;border:1px solid #0d6fbd;-webkit-transform:translateX(40px);-ms-transform:translateX(40px);transform:translateX(40px)}.slider.round,.pro-slider.round{border:1px solid #b8b8b9;border-radius:34px}.slider.round:before,.pro-slider.round:before{border-radius:50%}.pa-maps-table{text-align:left}.pa-api-title{display:inline-block;margin:0}.pa-api-disable-title label,.pa-is-beta label{margin-right:15px}.pa-api-disable-title span,.pa-is-beta span{font-weight:400}.pa-maps-api-notice{margin:10px 0 0}.pa-api-title input{margin-top:10px;font-size:normal;font-weight:400;width:400px;margin-left:30px}#pa-maintenance{margin-top:30px}.pa-beta-table tr{text-align:left}.pa-roll-back,.pa-beta-test{text-align:left;font-size:20px;font-weight:400;margin-top:15px;margin-bottom:10px}.pa-beta-test{margin-top:0}.pa-roll-back-span,.pa-beta-test-span{line-height:22px;color:#444;font-size:13px;margin:0;font-weight:400}.pa-roll-row,.pa-beta-row{float:left}.pa-beta-row{margin-top:13px}.pa-roll-row th,.pa-beta-row th{vertical-align:top;text-align:left;padding:20px 10px 20px 0;width:200px;line-height:1.3}.pa-roll-row td{padding:15px 10px}.pa-beta-row td{padding:22px 10px}.pa-roll-row .pa-rollback-button{box-shadow:0 1px 0 #ccc;color:#555;border:1px solid #ccc;background:#f7f7f7;vertical-align:top;margin:0;padding:0 10px 1px}.pa-roll-row .pa-rollback-button:hover{background:#fafafa;border-color:#999;color:#23282d}.pa-roll-row .pa-roll-desc{font-style:italic;color:red;margin-top:4px}.pa-beta-row .pa-beta-desc{font-style:italic;margin-top:4px}.pa-sys-info-tab{background:#f7f7f7;margin:8px;border:2px solid #ddd;border-radius:3px;padding:0}.pa-system-info-container{padding:10px}.pa-sys-info-tab .pa-sys-info-title{margin:0;margin-bottom:0;padding:10px;border-bottom:2px solid #ddd;background:#fff;margin-bottom:10px;font-weight:500}tr.pa-sec-elems-tr{border:none}tr.pa-sec-elems-tr th{padding-bottom:0}tr.pa-sec-elems-tr th h1{font-weight:700;font-size:25px;letter-spacing:1px;color:#555;margin-bottom:0}.pa-swal-head{display:block;margin-bottom:20px}.pa-swal-desc{font-weight:700;color:#0f6aa7}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/assets/admin.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
//Go Between the Tabs
|
2 |
( function ( $ ){
|
3 |
-
|
4 |
var redirectionLink = " https://premiumaddons.com/pro/?utm_source=wp-menu&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=";
|
5 |
"use strict";
|
6 |
|
1 |
//Go Between the Tabs
|
2 |
( function ( $ ){
|
|
|
3 |
var redirectionLink = " https://premiumaddons.com/pro/?utm_source=wp-menu&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=";
|
4 |
"use strict";
|
5 |
|
admin/assets/js/sweetalert2/{js/core.js → core.js}
RENAMED
File without changes
|
admin/assets/js/sweetalert2/{css/sweetalert2.min.css → sweetalert2.min.css}
RENAMED
File without changes
|
admin/assets/js/sweetalert2/{js/sweetalert2.min.js → sweetalert2.min.js}
RENAMED
File without changes
|
admin/includes/notices.php
ADDED
@@ -0,0 +1,254 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace PremiumAddons;
|
4 |
+
|
5 |
+
if( !defined( 'ABSPATH') ) exit();
|
6 |
+
|
7 |
+
class Premium_Admin_Notices {
|
8 |
+
|
9 |
+
private static $instance = null;
|
10 |
+
|
11 |
+
private static $elementor = 'elementor';
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Constructor for the class
|
15 |
+
*/
|
16 |
+
public function __construct() {
|
17 |
+
add_action('admin_init', array( $this, 'init') );
|
18 |
+
|
19 |
+
add_action('admin_notices', array( $this, 'check_admin_notices' ) );
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* init required functions
|
24 |
+
*/
|
25 |
+
public function init(){
|
26 |
+
$this->handle_get_pro_notice();
|
27 |
+
$this->handle_review_notice();
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* init notices check functions
|
32 |
+
*/
|
33 |
+
public function check_admin_notices() {
|
34 |
+
$this->required_plugins_check();
|
35 |
+
$this->get_review_notice();
|
36 |
+
$this->get_pro_notice();
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Checks if get pro version message is dismissed.
|
41 |
+
* @access public
|
42 |
+
* @return void
|
43 |
+
*/
|
44 |
+
public function handle_get_pro_notice() {
|
45 |
+
|
46 |
+
if ( ! isset( $_GET['get_pa_pro'] ) ) {
|
47 |
+
return;
|
48 |
+
}
|
49 |
+
|
50 |
+
if ( 'opt_out' === $_GET['get_pa_pro'] ) {
|
51 |
+
check_admin_referer( 'opt_out' );
|
52 |
+
|
53 |
+
update_option( 'get_pa_pro_notice', '1' );
|
54 |
+
}
|
55 |
+
|
56 |
+
wp_redirect( remove_query_arg( 'get_pa_pro' ) );
|
57 |
+
exit;
|
58 |
+
}
|
59 |
+
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Checks if review message is dismissed.
|
63 |
+
* @access public
|
64 |
+
* @return void
|
65 |
+
*/
|
66 |
+
public function handle_review_notice() {
|
67 |
+
|
68 |
+
if ( ! isset( $_GET['pa_review'] ) ) {
|
69 |
+
return;
|
70 |
+
}
|
71 |
+
|
72 |
+
if ( 'opt_out' === $_GET['pa_review'] ) {
|
73 |
+
check_admin_referer( 'opt_out' );
|
74 |
+
|
75 |
+
update_option( 'pa_review_notice', '1' );
|
76 |
+
}
|
77 |
+
|
78 |
+
wp_redirect( remove_query_arg( 'pa_review' ) );
|
79 |
+
exit;
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Shows an admin notice when Elementor is missing.
|
84 |
+
* @since 1.0.0
|
85 |
+
* @return boolean
|
86 |
+
*/
|
87 |
+
public function required_plugins_check() {
|
88 |
+
|
89 |
+
$elementor_path = sprintf( '%s/%s.php', self::$elementor, self::$elementor );
|
90 |
+
|
91 |
+
if( ! defined('ELEMENTOR_VERSION' ) ) {
|
92 |
+
|
93 |
+
if ( ! self::is_plugin_installed( $elementor_path ) ) {
|
94 |
+
|
95 |
+
if( self::check_user_can( 'install_plugins' ) ) {
|
96 |
+
|
97 |
+
$install_url = wp_nonce_url( self_admin_url( sprintf( 'update.php?action=install-plugin&plugin=%s', self::$elementor ) ), 'install-plugin_elementor' );
|
98 |
+
|
99 |
+
$message = __( '<p>Premium Addons for Elementor is not working because you need to Install Elementor plugin.</p>', 'premium-addons-for-elementor' );
|
100 |
+
|
101 |
+
$message .= sprintf( '<p><a href="%s" class="button-primary">%s</a></p>', $install_url, __( 'Install Now', 'premium-addons-for-elementor' ) );
|
102 |
+
|
103 |
+
}
|
104 |
+
} else {
|
105 |
+
if( self::check_user_can( 'activate_plugins' ) ) {
|
106 |
+
|
107 |
+
$activation_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $elementor_path . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $elementor_path );
|
108 |
+
|
109 |
+
$message = '<p>' . __( 'Premium Addons for Elementor is not working because you need to activate Elementor plugin.', 'premium-addons-for-elementor' ) . '</p>';
|
110 |
+
|
111 |
+
$message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $activation_url, __( 'Activate Now', 'premium-addons-for-elementor' ) ) . '</p>';
|
112 |
+
|
113 |
+
}
|
114 |
+
}
|
115 |
+
$this->render_admin_notices( $message );
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Checks if review admin notice is dismissed
|
121 |
+
* @since 2.6.8
|
122 |
+
* @return boolean
|
123 |
+
*/
|
124 |
+
public function get_review_notice() {
|
125 |
+
|
126 |
+
$review = get_option( 'pa_review_notice' );
|
127 |
+
|
128 |
+
$review_url = 'https://wordpress.org/support/plugin/premium-addons-for-elementor/reviews/?filter=5';
|
129 |
+
|
130 |
+
if ( '1' === $review ) {
|
131 |
+
return;
|
132 |
+
} else if ( '1' !== $review ) {
|
133 |
+
$optout_url = wp_nonce_url( add_query_arg( 'pa_review', 'opt_out' ), 'opt_out' );
|
134 |
+
|
135 |
+
$review_message = sprintf( __('<p style="display: flex; align-items: center; padding:10px 10px 10px 0;"><img src="%s" style="margin-right: 0.8em; width: 40px;">Did you like<strong> Premium Addons for Elementor </strong>Plugin?<span> please help us by leaving a five star review on WordPress.org. </span><a href="%s" target="_blank" style="flex-grow: 2;">Leave a Review.</a>', 'premium-addons-for-elementor' ), PREMIUM_ADDONS_URL .'admin/images/premium-addons-logo.png' ,$review_url );
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
$review_message .= sprintf(__('<a href="%s" style="text-decoration: none; margin-left: 1em; float:right; "><span class="dashicons dashicons-dismiss"></span></a></p>', 'premium-addons-for-elementor'), $optout_url );
|
140 |
+
|
141 |
+
$this->render_admin_notices( $review_message );
|
142 |
+
}
|
143 |
+
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Shows an admin notice when Elementor is missing.
|
147 |
+
* @since 2.6.8
|
148 |
+
* @return boolean
|
149 |
+
*/
|
150 |
+
public function get_pro_notice(){
|
151 |
+
|
152 |
+
$pro_path = 'premium-addons-pro/premium-addons-pro-for-elementor.php';
|
153 |
+
|
154 |
+
$theme = self::get_installed_theme();
|
155 |
+
|
156 |
+
$url = sprintf( 'https://premiumaddons.com/pro/?utm_source=notification&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=%s', $theme );
|
157 |
+
|
158 |
+
if ( ! self::is_plugin_installed( $pro_path ) && current_user_can( 'install_plugins' ) ) {
|
159 |
+
|
160 |
+
$get_pro = get_option( 'get_pa_pro_notice' );
|
161 |
+
|
162 |
+
if ( '1' === $get_pro ) {
|
163 |
+
return;
|
164 |
+
} else if ( '1' !== $get_pro ) {
|
165 |
+
$optout_url = wp_nonce_url( add_query_arg( 'get_pa_pro', 'opt_out' ), 'opt_out' );
|
166 |
+
|
167 |
+
$message = sprintf( __('<p style="display: flex; align-items: center; padding:10px 10px 10px 0;"><img src="%s" style="margin-right: 0.8em; width: 40px;"><strong>Premium Addons PRO </strong><span> is now available! </span><a href="%s" target="_blank" style="flex-grow: 2;"> Check it out now.</a>', 'premium-addons-for-elementor' ), PREMIUM_ADDONS_URL .'admin/images/premium-addons-logo.png' ,$url );
|
168 |
+
|
169 |
+
}
|
170 |
+
|
171 |
+
$message .= sprintf(__('<a href="%s" style="text-decoration: none; margin-left: 1em; float:right; "><span class="dashicons dashicons-dismiss"></span></a></p>', 'premium-addons-for-elementor'), $optout_url );
|
172 |
+
|
173 |
+
$this->render_admin_notices( $message );
|
174 |
+
|
175 |
+
}
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Returns the active theme slug
|
180 |
+
*/
|
181 |
+
public static function get_installed_theme() {
|
182 |
+
|
183 |
+
$theme = wp_get_theme();
|
184 |
+
|
185 |
+
if( $theme->parent() ) {
|
186 |
+
|
187 |
+
$theme_name = $theme->parent()->get('Name');
|
188 |
+
|
189 |
+
} else {
|
190 |
+
|
191 |
+
$theme_name = $theme->get('Name');
|
192 |
+
|
193 |
+
}
|
194 |
+
|
195 |
+
$theme_name = sanitize_key( $theme_name );
|
196 |
+
|
197 |
+
return $theme_name;
|
198 |
+
}
|
199 |
+
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Checks if a plugin is installed
|
203 |
+
* @since 1.0.0
|
204 |
+
* @return boolean
|
205 |
+
*/
|
206 |
+
public static function is_plugin_installed( $plugin_path ){
|
207 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
208 |
+
$plugins = get_plugins();
|
209 |
+
return isset( $plugins[ $plugin_path ] );
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Checks user credentials
|
214 |
+
* @since 2.6.8
|
215 |
+
* @return boolean
|
216 |
+
*/
|
217 |
+
public static function check_user_can($action) {
|
218 |
+
return current_user_can( $action );
|
219 |
+
}
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Renders an admin notice error message
|
223 |
+
* @since 1.0.0
|
224 |
+
* @access private
|
225 |
+
* @return void
|
226 |
+
*/
|
227 |
+
private function render_admin_notices( $message ) {
|
228 |
+
?>
|
229 |
+
<div class="error pa-notice-wrap">
|
230 |
+
<?php echo $message; ?>
|
231 |
+
</div>
|
232 |
+
<?php
|
233 |
+
}
|
234 |
+
|
235 |
+
public static function get_instance(){
|
236 |
+
if( self::$instance == null ) {
|
237 |
+
self::$instance = new self;
|
238 |
+
}
|
239 |
+
return self::$instance;
|
240 |
+
}
|
241 |
+
|
242 |
+
}
|
243 |
+
|
244 |
+
if( ! function_exists('get_notices_instance') ) {
|
245 |
+
/**
|
246 |
+
* Returns an instance of the plugin class.
|
247 |
+
* @since 1.1.1
|
248 |
+
* @return object
|
249 |
+
*/
|
250 |
+
function get_notices_instance() {
|
251 |
+
return Premium_Admin_Notices::get_instance();
|
252 |
+
}
|
253 |
+
}
|
254 |
+
get_notices_instance();
|
admin/settings/about.php
CHANGED
@@ -6,7 +6,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
6 |
class PA_About {
|
7 |
|
8 |
public function create_about_menu(){
|
9 |
-
if ( ! Helper_Functions::is_show_about()){
|
10 |
add_submenu_page(
|
11 |
'premium-addons',
|
12 |
'',
|
@@ -20,15 +20,7 @@ class PA_About {
|
|
20 |
|
21 |
public function pa_about_page(){
|
22 |
|
23 |
-
$
|
24 |
-
|
25 |
-
if( $theme->parent() ) {
|
26 |
-
$theme_name = $theme->parent()->get('Name');
|
27 |
-
} else {
|
28 |
-
$theme_name = $theme->get('Name');
|
29 |
-
}
|
30 |
-
|
31 |
-
$theme_name = sanitize_key( $theme_name );
|
32 |
|
33 |
$url = sprintf('https://premiumaddons.com/pro/?utm_source=about-page&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=%s', $theme_name );
|
34 |
|
@@ -42,7 +34,7 @@ class PA_About {
|
|
42 |
<h1 class="pa-title-main"><?php echo Helper_Functions::name(); ?></h1>
|
43 |
<h3 class="pa-title-sub"><?php echo sprintf(__('Thank you for using %s. This plugin has been developed by %s and we hope you enjoy using it.','premium-addons-for-elementor'), Helper_Functions::name(),Helper_Functions::author()); ?></h3>
|
44 |
</div>
|
45 |
-
<?php if( ! Helper_Functions::is_show_logo()) : ?>
|
46 |
<div class="pa-title-right">
|
47 |
<img class="pa-logo" src="<?php echo PREMIUM_ADDONS_URL . 'admin/images/premium-addons-logo.png';?>">
|
48 |
</div>
|
@@ -60,7 +52,7 @@ class PA_About {
|
|
60 |
<h4>What is Premium Addons?</h4>
|
61 |
<p>Premium Addons for Elementor extends Elementor Page Builder capabilities with many fully customizable widgets and addons that help you to build impressive websites with no coding required.</p>
|
62 |
<?php if( !defined('PREMIUM_PRO_ADDONS_VERSION') ) : ?>
|
63 |
-
|
64 |
<?php endif; ?>
|
65 |
</div>
|
66 |
</div>
|
6 |
class PA_About {
|
7 |
|
8 |
public function create_about_menu(){
|
9 |
+
if ( ! Helper_Functions::is_show_about() ) {
|
10 |
add_submenu_page(
|
11 |
'premium-addons',
|
12 |
'',
|
20 |
|
21 |
public function pa_about_page(){
|
22 |
|
23 |
+
$theme_name = Premium_Admin_Notices::get_installed_theme();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
$url = sprintf('https://premiumaddons.com/pro/?utm_source=about-page&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=%s', $theme_name );
|
26 |
|
34 |
<h1 class="pa-title-main"><?php echo Helper_Functions::name(); ?></h1>
|
35 |
<h3 class="pa-title-sub"><?php echo sprintf(__('Thank you for using %s. This plugin has been developed by %s and we hope you enjoy using it.','premium-addons-for-elementor'), Helper_Functions::name(),Helper_Functions::author()); ?></h3>
|
36 |
</div>
|
37 |
+
<?php if( ! Helper_Functions::is_show_logo() ) : ?>
|
38 |
<div class="pa-title-right">
|
39 |
<img class="pa-logo" src="<?php echo PREMIUM_ADDONS_URL . 'admin/images/premium-addons-logo.png';?>">
|
40 |
</div>
|
52 |
<h4>What is Premium Addons?</h4>
|
53 |
<p>Premium Addons for Elementor extends Elementor Page Builder capabilities with many fully customizable widgets and addons that help you to build impressive websites with no coding required.</p>
|
54 |
<?php if( !defined('PREMIUM_PRO_ADDONS_VERSION') ) : ?>
|
55 |
+
<p>Get more widgets and addons with <strong>Premium Addons Pro</strong> <a href="<?php echo esc_url( $url ); ?>" target="_blank" >Click Here</a> to know more.</p>
|
56 |
<?php endif; ?>
|
57 |
</div>
|
58 |
</div>
|
admin/settings/elements.php
CHANGED
@@ -8,7 +8,7 @@ class PA_admin_settings {
|
|
8 |
|
9 |
protected $page_slug = 'premium-addons';
|
10 |
|
11 |
-
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-grid'];
|
12 |
|
13 |
private $pa_default_settings;
|
14 |
|
@@ -25,7 +25,7 @@ class PA_admin_settings {
|
|
25 |
|
26 |
public function localize_js_script(){
|
27 |
wp_localize_script(
|
28 |
-
'
|
29 |
'premiumRollBackConfirm',
|
30 |
[
|
31 |
'home_url' => home_url(),
|
@@ -43,60 +43,53 @@ class PA_admin_settings {
|
|
43 |
wp_enqueue_style( 'pa_admin_icon', PREMIUM_ADDONS_URL .'admin/assets/pa-elements-font/css/pafont.css' );
|
44 |
$current_screen = get_current_screen();
|
45 |
if( strpos($current_screen->id , $this->page_slug) !== false ){
|
|
|
46 |
|
47 |
-
|
48 |
-
wp_enqueue_style('premium-addons-admin-style');
|
49 |
|
50 |
-
|
51 |
-
wp_enqueue_style('premium-addons-sweetalert-style');
|
52 |
|
53 |
-
|
54 |
-
wp_enqueue_script('premium-addons-admin-js');
|
55 |
|
56 |
-
|
57 |
-
wp_enqueue_script('premium-addons-admin-dialog');
|
58 |
|
59 |
-
|
60 |
-
wp_enqueue_script('premium-addons-sweetalert-core');
|
61 |
-
|
62 |
-
wp_register_script( 'premium-addons-sweetalert', PREMIUM_ADDONS_URL.'admin/assets/js/sweetalert2/js/sweetalert2.min.js', array( 'jquery', 'premium-addons-sweetalert-core' ), PREMIUM_ADDONS_VERSION, true );
|
63 |
-
wp_enqueue_script('premium-addons-sweetalert');
|
64 |
|
65 |
}
|
66 |
}
|
67 |
|
68 |
public function pa_admin_menu() {
|
69 |
-
|
70 |
-
|
71 |
-
|
|
|
72 |
$plugin_name = 'Premium Addons for Elementor';
|
73 |
}
|
74 |
|
75 |
-
add_menu_page(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
77 |
|
78 |
public function pa_admin_page(){
|
79 |
-
|
80 |
-
$theme = wp_get_theme();
|
81 |
|
82 |
-
if( $theme->parent() ) {
|
83 |
-
$theme_name = $theme->parent()->get('Name');
|
84 |
-
} else {
|
85 |
-
$theme_name = $theme->get('Name');
|
86 |
-
}
|
87 |
-
|
88 |
-
$theme_name = sanitize_key($theme_name);
|
89 |
-
|
90 |
$js_info = array(
|
91 |
-
'ajaxurl'
|
92 |
'theme' => $theme_name
|
93 |
);
|
94 |
|
95 |
-
wp_localize_script( '
|
96 |
|
97 |
-
$this->pa_default_settings =
|
98 |
|
99 |
-
$this->pa_get_settings =
|
100 |
|
101 |
$pa_new_settings = array_diff_key( $this->pa_default_settings, $this->pa_get_settings );
|
102 |
|
@@ -579,40 +572,54 @@ class PA_admin_settings {
|
|
579 |
<?php
|
580 |
}
|
581 |
|
582 |
-
public function
|
583 |
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
'premium-dual-header' => intval( $settings['premium-dual-header'] ? 1 : 0 ),
|
597 |
-
'premium-fancytext' => intval( $settings['premium-fancytext'] ? 1 : 0 ),
|
598 |
-
'premium-image-separator' => intval( $settings['premium-image-separator'] ? 1 : 0 ),
|
599 |
-
'premium-maps' => intval( $settings['premium-maps'] ? 1 : 0 ),
|
600 |
-
'premium-modalbox' => intval( $settings['premium-modalbox'] ? 1 : 0 ),
|
601 |
-
'premium-person' => intval( $settings['premium-person'] ? 1 : 0 ),
|
602 |
-
'premium-progressbar' => intval( $settings['premium-progressbar'] ? 1 : 0 ),
|
603 |
-
'premium-testimonials' => intval( $settings['premium-testimonials'] ? 1 : 0 ),
|
604 |
-
'premium-title' => intval( $settings['premium-title'] ? 1 : 0 ),
|
605 |
-
'premium-videobox' => intval( $settings['premium-videobox'] ? 1 : 0 ),
|
606 |
-
'premium-pricing-table' => intval( $settings['premium-pricing-table'] ? 1 : 0),
|
607 |
-
'premium-button' => intval( $settings['premium-button'] ? 1 : 0),
|
608 |
-
'premium-contactform' => intval( $settings['premium-contactform'] ? 1 : 0),
|
609 |
-
'premium-image-button' => intval( $settings['premium-image-button'] ? 1 : 0),
|
610 |
-
'premium-grid' => intval( $settings['premium-grid'] ? 1 : 0),
|
611 |
-
);
|
612 |
-
|
613 |
-
update_option( 'pa_save_settings', $this->pa_settings );
|
614 |
-
|
615 |
-
return true;
|
616 |
-
die();
|
617 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
618 |
}
|
8 |
|
9 |
protected $page_slug = 'premium-addons';
|
10 |
|
11 |
+
public static $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-grid'];
|
12 |
|
13 |
private $pa_default_settings;
|
14 |
|
25 |
|
26 |
public function localize_js_script(){
|
27 |
wp_localize_script(
|
28 |
+
'pa-admin-js',
|
29 |
'premiumRollBackConfirm',
|
30 |
[
|
31 |
'home_url' => home_url(),
|
43 |
wp_enqueue_style( 'pa_admin_icon', PREMIUM_ADDONS_URL .'admin/assets/pa-elements-font/css/pafont.css' );
|
44 |
$current_screen = get_current_screen();
|
45 |
if( strpos($current_screen->id , $this->page_slug) !== false ){
|
46 |
+
wp_enqueue_style( 'pa-admin-css', PREMIUM_ADDONS_URL.'admin/assets/admin.css' );
|
47 |
|
48 |
+
wp_enqueue_style( 'premium-addons-sweetalert-style', PREMIUM_ADDONS_URL.'admin/assets/js/sweetalert2/sweetalert2.min.css' );
|
|
|
49 |
|
50 |
+
wp_enqueue_script('pa-admin-js', PREMIUM_ADDONS_URL .'admin/assets/admin.js' , array('jquery'), PREMIUM_ADDONS_VERSION , true );
|
|
|
51 |
|
52 |
+
wp_enqueue_script('pa-admin-dialog', PREMIUM_ADDONS_URL . 'admin/assets/js/dialog/dialog.js',array('jquery-ui-position'),PREMIUM_ADDONS_VERSION,true);
|
|
|
53 |
|
54 |
+
wp_enqueue_script('pa-sweetalert-core', PREMIUM_ADDONS_URL . 'admin/assets/js/sweetalert2/core.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
|
|
|
55 |
|
56 |
+
wp_enqueue_script( 'pa-sweetalert', PREMIUM_ADDONS_URL . 'admin/assets/js/sweetalert2/sweetalert2.min.js', array( 'jquery', 'pa-sweetalert-core' ), PREMIUM_ADDONS_VERSION, true );
|
|
|
|
|
|
|
|
|
57 |
|
58 |
}
|
59 |
}
|
60 |
|
61 |
public function pa_admin_menu() {
|
62 |
+
|
63 |
+
$plugin_name = get_option('pa_wht_lbl_save_settings')['premium-wht-lbl-plugin-name'];
|
64 |
+
|
65 |
+
if( ! defined('PREMIUM_PRO_ADDONS_VERSION') || ! isset( $plugin_name ) || '' == $plugin_name ){
|
66 |
$plugin_name = 'Premium Addons for Elementor';
|
67 |
}
|
68 |
|
69 |
+
add_menu_page(
|
70 |
+
$plugin_name,
|
71 |
+
$plugin_name,
|
72 |
+
'manage_options',
|
73 |
+
'premium-addons',
|
74 |
+
array( $this , 'pa_admin_page' ),
|
75 |
+
'' ,
|
76 |
+
100
|
77 |
+
);
|
78 |
}
|
79 |
|
80 |
public function pa_admin_page(){
|
81 |
+
$theme_name = Premium_Admin_Notices::get_installed_theme();
|
|
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
$js_info = array(
|
84 |
+
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
85 |
'theme' => $theme_name
|
86 |
);
|
87 |
|
88 |
+
wp_localize_script( 'pa-admin-js', 'settings', $js_info );
|
89 |
|
90 |
+
$this->pa_default_settings = $this->get_default_keys();
|
91 |
|
92 |
+
$this->pa_get_settings = $this->get_enabled_keys();
|
93 |
|
94 |
$pa_new_settings = array_diff_key( $this->pa_default_settings, $this->pa_get_settings );
|
95 |
|
572 |
<?php
|
573 |
}
|
574 |
|
575 |
+
public static function get_default_keys() {
|
576 |
|
577 |
+
$default_keys = array_fill_keys( self::$pa_elements_keys, true );
|
578 |
+
|
579 |
+
return $default_keys;
|
580 |
+
}
|
581 |
+
|
582 |
+
public static function get_enabled_keys() {
|
583 |
+
|
584 |
+
$enabled_keys = get_option( 'pa_save_settings', self::get_default_keys() );
|
585 |
+
|
586 |
+
return $enabled_keys;
|
587 |
+
}
|
588 |
|
589 |
+
public function pa_save_settings_with_ajax() {
|
590 |
+
|
591 |
+
if( isset( $_POST['fields'] ) ) {
|
592 |
+
parse_str( $_POST['fields'], $settings );
|
593 |
+
} else {
|
594 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
595 |
}
|
596 |
+
|
597 |
+
$this->pa_settings = array(
|
598 |
+
'premium-banner' => intval( $settings['premium-banner'] ? 1 : 0 ),
|
599 |
+
'premium-blog' => intval( $settings['premium-blog'] ? 1 : 0 ),
|
600 |
+
'premium-carousel' => intval( $settings['premium-carousel'] ? 1 : 0 ),
|
601 |
+
'premium-countdown' => intval( $settings['premium-countdown'] ? 1 : 0 ),
|
602 |
+
'premium-counter' => intval( $settings['premium-counter'] ? 1 : 0 ),
|
603 |
+
'premium-dual-header' => intval( $settings['premium-dual-header'] ? 1 : 0 ),
|
604 |
+
'premium-fancytext' => intval( $settings['premium-fancytext'] ? 1 : 0 ),
|
605 |
+
'premium-image-separator' => intval( $settings['premium-image-separator'] ? 1 : 0 ),
|
606 |
+
'premium-maps' => intval( $settings['premium-maps'] ? 1 : 0 ),
|
607 |
+
'premium-modalbox' => intval( $settings['premium-modalbox'] ? 1 : 0 ),
|
608 |
+
'premium-person' => intval( $settings['premium-person'] ? 1 : 0 ),
|
609 |
+
'premium-progressbar' => intval( $settings['premium-progressbar'] ? 1 : 0 ),
|
610 |
+
'premium-testimonials' => intval( $settings['premium-testimonials'] ? 1 : 0 ),
|
611 |
+
'premium-title' => intval( $settings['premium-title'] ? 1 : 0 ),
|
612 |
+
'premium-videobox' => intval( $settings['premium-videobox'] ? 1 : 0 ),
|
613 |
+
'premium-pricing-table' => intval( $settings['premium-pricing-table'] ? 1 : 0),
|
614 |
+
'premium-button' => intval( $settings['premium-button'] ? 1 : 0),
|
615 |
+
'premium-contactform' => intval( $settings['premium-contactform'] ? 1 : 0),
|
616 |
+
'premium-image-button' => intval( $settings['premium-image-button'] ? 1 : 0),
|
617 |
+
'premium-grid' => intval( $settings['premium-grid'] ? 1 : 0),
|
618 |
+
);
|
619 |
+
|
620 |
+
update_option( 'pa_save_settings', $this->pa_settings );
|
621 |
+
|
622 |
+
return true;
|
623 |
+
die();
|
624 |
+
}
|
625 |
}
|
admin/settings/gomaps.php
CHANGED
@@ -6,7 +6,7 @@ if(!defined('ABSPATH')) exit;
|
|
6 |
|
7 |
class PA_Gomaps {
|
8 |
|
9 |
-
public $pa_maps_keys = [ 'premium-map-api', 'premium-map-disable-api' ];
|
10 |
|
11 |
private $pa_maps_default_settings;
|
12 |
|
@@ -36,11 +36,11 @@ class PA_Gomaps {
|
|
36 |
'ajaxurl' => admin_url( 'admin-ajax.php' )
|
37 |
);
|
38 |
|
39 |
-
wp_localize_script( '
|
40 |
|
41 |
-
$this->pa_maps_default_settings =
|
42 |
|
43 |
-
$this->pa_maps_get_settings =
|
44 |
|
45 |
$pa_maps_new_settings = array_diff_key( $this->pa_maps_default_settings, $this->pa_maps_get_settings );
|
46 |
|
@@ -99,6 +99,19 @@ class PA_Gomaps {
|
|
99 |
</div>
|
100 |
<?php }
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
public function pa_save_maps_settings_with_ajax() {
|
103 |
|
104 |
if( isset( $_POST['fields'] ) ) {
|
6 |
|
7 |
class PA_Gomaps {
|
8 |
|
9 |
+
public static $pa_maps_keys = [ 'premium-map-api', 'premium-map-disable-api' ];
|
10 |
|
11 |
private $pa_maps_default_settings;
|
12 |
|
36 |
'ajaxurl' => admin_url( 'admin-ajax.php' )
|
37 |
);
|
38 |
|
39 |
+
wp_localize_script( 'pa-admin-js', 'settings', $js_info );
|
40 |
|
41 |
+
$this->pa_maps_default_settings = $this->get_default_keys();
|
42 |
|
43 |
+
$this->pa_maps_get_settings = $this->get_enabled_keys();
|
44 |
|
45 |
$pa_maps_new_settings = array_diff_key( $this->pa_maps_default_settings, $this->pa_maps_get_settings );
|
46 |
|
99 |
</div>
|
100 |
<?php }
|
101 |
|
102 |
+
public static function get_default_keys() {
|
103 |
+
|
104 |
+
$default_keys = array_fill_keys( self::$pa_maps_keys, true );
|
105 |
+
|
106 |
+
return $default_keys;
|
107 |
+
}
|
108 |
+
|
109 |
+
public static function get_enabled_keys() {
|
110 |
+
$enabled_keys = get_option( 'pa_maps_save_settings', self::get_default_keys() );
|
111 |
+
|
112 |
+
return $enabled_keys;
|
113 |
+
}
|
114 |
+
|
115 |
public function pa_save_maps_settings_with_ajax() {
|
116 |
|
117 |
if( isset( $_POST['fields'] ) ) {
|
admin/settings/gopro.php
CHANGED
@@ -21,7 +21,7 @@ class Pro_Settings {
|
|
21 |
|
22 |
public function handle_custom_redirects() {
|
23 |
|
24 |
-
$
|
25 |
|
26 |
if ( empty( $_GET['page'] ) ) {
|
27 |
return;
|
@@ -29,7 +29,7 @@ class Pro_Settings {
|
|
29 |
|
30 |
if ( 'premium-addons-pro' === $_GET['page'] ) {
|
31 |
|
32 |
-
$url = sprintf('https://premiumaddons.com/pro/?utm_source=wp-menu&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=%s', $
|
33 |
|
34 |
wp_redirect( $url );
|
35 |
|
@@ -49,22 +49,6 @@ class Pro_Settings {
|
|
49 |
|
50 |
$this->handle_custom_redirects();
|
51 |
|
52 |
-
}
|
53 |
-
|
54 |
-
public function get_installed_theme() {
|
55 |
-
|
56 |
-
$theme = wp_get_theme();
|
57 |
-
|
58 |
-
if( $theme->parent() ) {
|
59 |
-
$theme_name = $theme->parent()->get('Name');
|
60 |
-
} else {
|
61 |
-
$theme_name = $theme->get('Name');
|
62 |
-
}
|
63 |
-
|
64 |
-
$theme_name = sanitize_key( $theme_name );
|
65 |
-
|
66 |
-
return $theme_name;
|
67 |
-
|
68 |
}
|
69 |
|
70 |
public function __construct() {
|
21 |
|
22 |
public function handle_custom_redirects() {
|
23 |
|
24 |
+
$theme_name = Premium_Admin_Notices::get_installed_theme();
|
25 |
|
26 |
if ( empty( $_GET['page'] ) ) {
|
27 |
return;
|
29 |
|
30 |
if ( 'premium-addons-pro' === $_GET['page'] ) {
|
31 |
|
32 |
+
$url = sprintf('https://premiumaddons.com/pro/?utm_source=wp-menu&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=%s', $theme_name );
|
33 |
|
34 |
wp_redirect( $url );
|
35 |
|
49 |
|
50 |
$this->handle_custom_redirects();
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
|
54 |
public function __construct() {
|
admin/settings/version-control.php
CHANGED
@@ -14,8 +14,7 @@ class PA_Version_Control {
|
|
14 |
|
15 |
private $pa_beta_get_settings;
|
16 |
|
17 |
-
public function __construct()
|
18 |
-
{
|
19 |
add_action( 'admin_menu', array ($this,'create_version_control_menu' ), 100 );
|
20 |
add_action( 'wp_ajax_pa_beta_save_settings', array( $this, 'pa_beta_save_settings_with_ajax' ) );
|
21 |
}
|
@@ -39,7 +38,7 @@ class PA_Version_Control {
|
|
39 |
'ajaxurl' => admin_url( 'admin-ajax.php' )
|
40 |
);
|
41 |
|
42 |
-
wp_localize_script( '
|
43 |
|
44 |
$this->pa_beta_default_settings = array_fill_keys( $this->pa_beta_keys, true );
|
45 |
|
@@ -80,7 +79,7 @@ class PA_Version_Control {
|
|
80 |
<tr class="pa-roll-row">
|
81 |
<th>Rollback Version</th>
|
82 |
<td>
|
83 |
-
<div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.6.
|
84 |
<p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
|
85 |
</td>
|
86 |
</tr>
|
14 |
|
15 |
private $pa_beta_get_settings;
|
16 |
|
17 |
+
public function __construct() {
|
|
|
18 |
add_action( 'admin_menu', array ($this,'create_version_control_menu' ), 100 );
|
19 |
add_action( 'wp_ajax_pa_beta_save_settings', array( $this, 'pa_beta_save_settings_with_ajax' ) );
|
20 |
}
|
38 |
'ajaxurl' => admin_url( 'admin-ajax.php' )
|
39 |
);
|
40 |
|
41 |
+
wp_localize_script( 'pa-admin-js', 'settings', $js_info );
|
42 |
|
43 |
$this->pa_beta_default_settings = array_fill_keys( $this->pa_beta_keys, true );
|
44 |
|
79 |
<tr class="pa-roll-row">
|
80 |
<th>Rollback Version</th>
|
81 |
<td>
|
82 |
+
<div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.6.6</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div>
|
83 |
<p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
|
84 |
</td>
|
85 |
</tr>
|
elementor-helper.php
CHANGED
@@ -57,7 +57,7 @@ class premium_Template_Tags {
|
|
57 |
|
58 |
$all_posts = get_posts( array(
|
59 |
'posts_per_page' => -1,
|
60 |
-
'post_type' =>
|
61 |
)
|
62 |
);
|
63 |
if( !empty( $all_posts ) && !is_wp_error( $all_posts ) ) {
|
57 |
|
58 |
$all_posts = get_posts( array(
|
59 |
'posts_per_page' => -1,
|
60 |
+
'post_type' => 'page',
|
61 |
)
|
62 |
);
|
63 |
if( !empty( $all_posts ) && !is_wp_error( $all_posts ) ) {
|
includes/class-addons-category.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace PremiumAddons;
|
4 |
+
|
5 |
+
if( ! defined( 'ABSPATH' ) ) exit();
|
6 |
+
|
7 |
+
class Premium_Addons_Category {
|
8 |
+
|
9 |
+
private static $instance = null;
|
10 |
+
|
11 |
+
public function __construct() {
|
12 |
+
$this->create_premium_category();
|
13 |
+
}
|
14 |
+
|
15 |
+
public function create_premium_category() {
|
16 |
+
\Elementor\Plugin::instance()->elements_manager->add_category(
|
17 |
+
'premium-elements',
|
18 |
+
array(
|
19 |
+
'title' => Helper_Functions::get_category()
|
20 |
+
),
|
21 |
+
1);
|
22 |
+
}
|
23 |
+
/**
|
24 |
+
* Creates and returns an instance of the class
|
25 |
+
* @since 2.6.8
|
26 |
+
* @access public
|
27 |
+
* return object
|
28 |
+
*/
|
29 |
+
public static function get_instance(){
|
30 |
+
if( self::$instance == null ) {
|
31 |
+
self::$instance = new self;
|
32 |
+
}
|
33 |
+
return self::$instance;
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
|
38 |
+
if ( ! function_exists( 'premium_addons_category' ) ) {
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Returns an instance of the plugin class.
|
42 |
+
* @since 2.6.8
|
43 |
+
* @return object
|
44 |
+
*/
|
45 |
+
function premium_addons_category() {
|
46 |
+
return Premium_Addons_Category::get_instance();
|
47 |
+
}
|
48 |
+
}
|
49 |
+
premium_addons_category();
|
includes/class-addons-integration.php
ADDED
@@ -0,0 +1,241 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace PremiumAddons;
|
4 |
+
|
5 |
+
if( ! defined( 'ABSPATH' ) ) exit();
|
6 |
+
|
7 |
+
class Premium_Addons_Integration {
|
8 |
+
|
9 |
+
private static $instance = null;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Initialize integration hooks
|
13 |
+
*
|
14 |
+
* @return void
|
15 |
+
*/
|
16 |
+
public function __construct() {
|
17 |
+
add_action( 'elementor/editor/before_enqueue_styles', array( $this, 'premium_font_setup' ) );
|
18 |
+
|
19 |
+
add_action( 'elementor/frontend/after_enqueue_styles', array( $this, 'premium_required_assets' ) );
|
20 |
+
|
21 |
+
add_action( 'elementor/widgets/widgets_registered', array( $this, 'premium_widgets_area' ) );
|
22 |
+
|
23 |
+
add_action( 'elementor/frontend/after_register_scripts', array( $this, 'premium_register_scripts' ) );
|
24 |
+
|
25 |
+
add_action('elementor/editor/before_enqueue_scripts', array($this,'premium_maps_get_address'));
|
26 |
+
|
27 |
+
add_action('wp_enqueue_scripts', array($this, 'premium_maps_required_script'));
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Loads plugin icons font
|
32 |
+
* @since 1.0.0
|
33 |
+
* @access public
|
34 |
+
* @return void
|
35 |
+
*/
|
36 |
+
public function premium_font_setup() {
|
37 |
+
wp_enqueue_style(
|
38 |
+
'premium-addons-font',
|
39 |
+
PREMIUM_ADDONS_URL . 'admin/assets/pa-elements-font/css/pa-elements.css'
|
40 |
+
);
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Enqueue required CSS files
|
45 |
+
* @since 1.0.0
|
46 |
+
* @access public
|
47 |
+
*/
|
48 |
+
public function premium_required_assets() {
|
49 |
+
wp_enqueue_style(
|
50 |
+
'premium-addons',
|
51 |
+
PREMIUM_ADDONS_URL . 'assets/css/premium-addons.css',
|
52 |
+
array(),
|
53 |
+
PREMIUM_ADDONS_VERSION,
|
54 |
+
'all'
|
55 |
+
);
|
56 |
+
|
57 |
+
$check_grid_active = PA_admin_settings::get_enabled_keys()['premium-grid'];
|
58 |
+
if( $check_grid_active ){
|
59 |
+
wp_enqueue_style('pa-prettyphoto', PREMIUM_ADDONS_URL . 'assets/css/prettyphoto.css', array(), PREMIUM_ADDONS_VERSION, 'all');
|
60 |
+
}
|
61 |
+
|
62 |
+
}
|
63 |
+
|
64 |
+
/** Load widgets require function
|
65 |
+
* @since 1.0.0
|
66 |
+
* @access public
|
67 |
+
*/
|
68 |
+
public function premium_widgets_area() {
|
69 |
+
$this->premium_widget_register();
|
70 |
+
}
|
71 |
+
|
72 |
+
/** Requires widgets files
|
73 |
+
* @since 1.0.0
|
74 |
+
* @access private
|
75 |
+
*/
|
76 |
+
private function premium_widget_register() {
|
77 |
+
|
78 |
+
$check_component_active = PA_admin_settings::get_enabled_keys();
|
79 |
+
|
80 |
+
foreach ( glob( PREMIUM_ADDONS_PATH . 'widgets/' . '*.php' ) as $file ) {
|
81 |
+
|
82 |
+
$slug = basename( $file, '.php' );
|
83 |
+
|
84 |
+
$enabled = isset( $check_component_active[ $slug ] ) ? $check_component_active[ $slug ] : '';
|
85 |
+
|
86 |
+
if ( filter_var( $enabled, FILTER_VALIDATE_BOOLEAN ) || ! $check_component_active ) {
|
87 |
+
$this->register_addon( $file );
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
}
|
92 |
+
|
93 |
+
/** Registers required JS files
|
94 |
+
* @since 1.0.0
|
95 |
+
* @access public
|
96 |
+
*/
|
97 |
+
public function premium_register_scripts() {
|
98 |
+
|
99 |
+
$check_component_active = PA_admin_settings::get_enabled_keys();
|
100 |
+
|
101 |
+
if ( $check_component_active['premium-progressbar'] || $check_component_active['premium-videobox'] || $check_component_active['premium-grid'] || $check_component_active['premium-fancytext'] || $check_component_active['premium-countdown'] || $check_component_active['premium-carousel'] || $check_component_active['premium-banner'] || $check_component_active['premium-maps'] || $check_component_active['premium-modalbox'] || $check_component_active['premium-blog'] || $check_component_active['premium-counter'] ) {
|
102 |
+
wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
103 |
+
}
|
104 |
+
|
105 |
+
if ( $check_component_active['premium-counter'] ) {
|
106 |
+
wp_register_script('counter-up-js', PREMIUM_ADDONS_URL . 'assets/js/lib/countUpmin.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
107 |
+
}
|
108 |
+
|
109 |
+
if ( $check_component_active['premium-grid']) {
|
110 |
+
wp_register_script('isotope-js', PREMIUM_ADDONS_URL . 'assets/js/lib/isotope.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
111 |
+
wp_register_script('prettyPhoto-js', PREMIUM_ADDONS_URL . 'assets/js/lib/prettyPhoto.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
112 |
+
}
|
113 |
+
|
114 |
+
if ( $check_component_active['premium-fancytext'] ) {
|
115 |
+
wp_register_script('vticker-js', PREMIUM_ADDONS_URL . 'assets/js/lib/Vticker.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
116 |
+
wp_register_script('typed-js', PREMIUM_ADDONS_URL . 'assets/js/lib/typedmin.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
117 |
+
}
|
118 |
+
|
119 |
+
if ( $check_component_active['premium-countdown'] ) {
|
120 |
+
wp_register_script('count-down-timer-js', PREMIUM_ADDONS_URL . 'assets/js/lib/jquerycountdown.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
121 |
+
}
|
122 |
+
|
123 |
+
if ( $check_component_active['premium-carousel'] ) {
|
124 |
+
wp_register_script('slick-carousel-js', PREMIUM_ADDONS_URL . 'assets/js/lib/slickmin.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
125 |
+
}
|
126 |
+
|
127 |
+
if ( $check_component_active['premium-blog'] ) {
|
128 |
+
wp_register_script('isotope-js', PREMIUM_ADDONS_URL . 'assets/js/lib/isotope.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
129 |
+
}
|
130 |
+
|
131 |
+
if ( $check_component_active['premium-modalbox'] ) {
|
132 |
+
wp_register_script('modal-js', PREMIUM_ADDONS_URL . 'assets/js/lib/modal.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
/*
|
137 |
+
* Enqueue Premium Maps API script
|
138 |
+
*/
|
139 |
+
public function premium_maps_required_script() {
|
140 |
+
|
141 |
+
$premium_maps_api = PA_Gomaps::get_enabled_keys()['premium-map-api'];
|
142 |
+
|
143 |
+
$premium_maps_disable_api = PA_Gomaps::get_enabled_keys()['premium-map-disable-api'];
|
144 |
+
|
145 |
+
$premium_maps_enabled = PA_admin_settings::get_enabled_keys()['premium-maps'];
|
146 |
+
|
147 |
+
if( $premium_maps_disable_api ) {
|
148 |
+
|
149 |
+
wp_enqueue_script('premium-maps-api-js', 'https://maps.googleapis.com/maps/api/js?key=' . $premium_maps_api, array(), PREMIUM_ADDONS_VERSION, false);
|
150 |
+
|
151 |
+
}
|
152 |
+
|
153 |
+
if ( $premium_maps_enabled ) {
|
154 |
+
|
155 |
+
wp_enqueue_script('google-maps-cluster', 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/markerclusterer.js', array(), PREMIUM_ADDONS_VERSION, false);
|
156 |
+
|
157 |
+
}
|
158 |
+
|
159 |
+
}
|
160 |
+
|
161 |
+
public function premium_maps_get_address() {
|
162 |
+
|
163 |
+
$premium_maps_api = PA_Gomaps::get_enabled_keys()['premium-map-api'];
|
164 |
+
|
165 |
+
$premium_maps_disable_api = PA_Gomaps::get_enabled_keys()['premium-map-disable-api'];
|
166 |
+
|
167 |
+
$map_enabled = PA_admin_settings::get_enabled_keys()['premium-maps'];
|
168 |
+
|
169 |
+
$premium_maps_enabled = isset( $map_enabled ) ? $map_enabled : 1;
|
170 |
+
|
171 |
+
if ( $premium_maps_disable_api ) {
|
172 |
+
|
173 |
+
wp_enqueue_script('premium-maps-api-js', 'https://maps.googleapis.com/maps/api/js?key=' . $premium_maps_api, array(), PREMIUM_ADDONS_VERSION, false);
|
174 |
+
|
175 |
+
}
|
176 |
+
|
177 |
+
if( $premium_maps_enabled ) {
|
178 |
+
|
179 |
+
wp_enqueue_script('premium-maps-address', PREMIUM_ADDONS_URL . 'assets/js/premium-maps-address.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
180 |
+
|
181 |
+
}
|
182 |
+
|
183 |
+
}
|
184 |
+
|
185 |
+
/**
|
186 |
+
* Register addon by file name
|
187 |
+
*
|
188 |
+
* @param string $file File name.
|
189 |
+
* @param object $widgets_manager Widgets manager instance.
|
190 |
+
* @return void
|
191 |
+
*/
|
192 |
+
public function register_addon( $file ) {
|
193 |
+
$base = basename( str_replace( '.php', '', $file ) );
|
194 |
+
$class = ucwords( str_replace( '-', ' ', $base ) );
|
195 |
+
$class = str_replace( ' ', '_', $class );
|
196 |
+
$class = sprintf( 'Elementor\%s', $class );
|
197 |
+
|
198 |
+
if( 'Elementor\Premium_Contactform' != $class ){
|
199 |
+
require $file;
|
200 |
+
} else {
|
201 |
+
if( function_exists('wpcf7') ) {
|
202 |
+
require $file;
|
203 |
+
}
|
204 |
+
}
|
205 |
+
|
206 |
+
if ( 'Elementor\Premium_Blog' == $class ) {
|
207 |
+
require_once ( PREMIUM_ADDONS_PATH . 'queries.php' );
|
208 |
+
}
|
209 |
+
|
210 |
+
if ( class_exists( $class ) ) {
|
211 |
+
\Elementor\PLUGIN::instance()->widgets_manager->register_widget_type( new $class );
|
212 |
+
}
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Creates and returns an instance of the class
|
217 |
+
* @since 1.0.0
|
218 |
+
* @access public
|
219 |
+
* return object
|
220 |
+
*/
|
221 |
+
public static function get_instance(){
|
222 |
+
if( self::$instance == null ) {
|
223 |
+
self::$instance = new self;
|
224 |
+
}
|
225 |
+
return self::$instance;
|
226 |
+
}
|
227 |
+
}
|
228 |
+
|
229 |
+
|
230 |
+
if ( ! function_exists( 'premium_addons_integration' ) ) {
|
231 |
+
|
232 |
+
/**
|
233 |
+
* Returns an instance of the plugin class.
|
234 |
+
* @since 1.0.0
|
235 |
+
* @return object
|
236 |
+
*/
|
237 |
+
function premium_addons_integration() {
|
238 |
+
return Premium_Addons_Integration::get_instance();
|
239 |
+
}
|
240 |
+
}
|
241 |
+
premium_addons_integration();
|
includes/{beta-testers.php → class-beta-testers.php}
RENAMED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
-
class
|
6 |
private $transient_key;
|
7 |
private function get_beta_version() {
|
8 |
$beta_version = get_site_transient( $this->transient_key );
|
2 |
|
3 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
+
class Premium_Beta_Testers {
|
6 |
private $transient_key;
|
7 |
private function get_beta_version() {
|
8 |
$beta_version = get_site_transient( $this->transient_key );
|
premium-addons-for-elementor.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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.6.
|
7 |
Author: Leap13
|
8 |
Author URI: http://leap13.com/
|
9 |
Text Domain: premium-addons-for-elementor
|
@@ -15,507 +15,164 @@ License: GNU General Public License v3.0
|
|
15 |
/**
|
16 |
* Checking if WordPress is installed
|
17 |
*/
|
18 |
-
if (!function_exists('add_action')) {
|
19 |
die('WordPress not Installed'); // if WordPress not installed kill the page.
|
20 |
}
|
21 |
|
22 |
-
if (!defined('ABSPATH')) exit; // No access of directly access
|
23 |
|
24 |
|
25 |
-
define('PREMIUM_ADDONS_VERSION', '2.6.
|
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.6.
|
31 |
|
32 |
-
|
33 |
-
* Loading text domain, Including required files
|
34 |
-
*/
|
35 |
-
add_action('plugins_loaded', 'premium_addons_elementor_setup');
|
36 |
-
function premium_addons_elementor_setup() {
|
37 |
-
|
38 |
-
load_plugin_textdomain('premium-addons-for-elementor', false, dirname(plugin_basename(__FILE__)) . '/languages/');
|
39 |
-
|
40 |
-
// Requires System Info When on Dashboard
|
41 |
-
if (is_admin()) {
|
42 |
-
require_once (PREMIUM_ADDONS_PATH . 'includes/system-info.php');
|
43 |
-
require_once (PREMIUM_ADDONS_PATH . 'includes/maintenance.php');
|
44 |
-
require_once (PREMIUM_ADDONS_PATH . 'includes/rollback.php');
|
45 |
-
require_once (PREMIUM_ADDONS_PATH . 'includes/beta-testers.php');
|
46 |
-
require_once (PREMIUM_ADDONS_PATH . 'plugin.php');
|
47 |
-
require_once (PREMIUM_ADDONS_PATH . 'admin/settings/about.php');
|
48 |
-
require_once (PREMIUM_ADDONS_PATH . 'admin/settings/version-control.php');
|
49 |
-
require_once (PREMIUM_ADDONS_PATH . 'admin/settings/sys-info.php');
|
50 |
-
require_once (PREMIUM_ADDONS_PATH . 'admin/settings/gopro.php');
|
51 |
-
$beta_testers = new PA_Beta_Testers();
|
52 |
-
}
|
53 |
-
|
54 |
-
require_once (PREMIUM_ADDONS_PATH . 'includes/helper-functions.php');
|
55 |
-
require_once (PREMIUM_ADDONS_PATH . 'admin/settings/gomaps.php');
|
56 |
-
require_once (PREMIUM_ADDONS_PATH . 'admin/settings/elements.php');
|
57 |
-
|
58 |
-
// load the template tags
|
59 |
-
if (file_exists(PREMIUM_ADDONS_PATH . 'elementor-helper.php')) {
|
60 |
-
require_once (PREMIUM_ADDONS_PATH . 'elementor-helper.php');
|
61 |
-
}
|
62 |
-
|
63 |
/*
|
64 |
-
|
65 |
-
* Included 1. 'premium_addons_widget_register()' for the main method for initaite addons
|
66 |
-
* 2. 'premium_addons_widgets_area()' creating the widgets
|
67 |
-
* 3. 'initiate_elementor_addons()' creating the category of the widgets
|
68 |
*/
|
69 |
-
|
70 |
-
new premium_Addon_Elementor();
|
71 |
-
}
|
72 |
-
|
73 |
-
// CSS THAT DISPLAYS ON EDITOR PANEL
|
74 |
-
add_action('elementor/editor/before_enqueue_scripts', function () {
|
75 |
-
|
76 |
-
wp_register_style('premium-elements-progression-admin-styles', PREMIUM_ADDONS_URL . 'admin/assets/pa-elements-font/css/pa-elements.css');
|
77 |
-
wp_enqueue_style('premium-elements-progression-admin-styles');
|
78 |
-
|
79 |
-
});
|
80 |
-
|
81 |
-
/*Automatic Redirection Upon Activation*/
|
82 |
-
register_activation_hook(__FILE__, 'pa_activation');
|
83 |
-
|
84 |
-
add_action('admin_init', 'pa_redirection');
|
85 |
-
|
86 |
-
function pa_activation() {
|
87 |
-
add_option('pa_activation_redirect', true);
|
88 |
-
}
|
89 |
-
|
90 |
-
function pa_redirection() {
|
91 |
-
|
92 |
-
if (get_option('pa_activation_redirect', false)) {
|
93 |
-
delete_option('pa_activation_redirect');
|
94 |
-
if (!is_network_admin()) {
|
95 |
-
wp_redirect("admin.php?page=premium-addons");
|
96 |
-
}
|
97 |
-
}
|
98 |
-
}
|
99 |
-
|
100 |
-
class premium_Addon_Elementor {
|
101 |
-
|
102 |
-
protected $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-contactform', 'premium-button', 'premium-image-button', 'premium-grid'];
|
103 |
-
|
104 |
-
/**
|
105 |
-
* Load all the hooks here
|
106 |
-
* @since 1.0
|
107 |
-
*/
|
108 |
-
public function __construct() {
|
109 |
-
add_action('admin_init', array( $this, 'handle_get_pro_notice'));
|
110 |
-
add_action('admin_init', array( $this, 'handle_review_notice'));
|
111 |
-
add_action('admin_notices', array( $this, 'required_plugins_check' ));
|
112 |
-
add_action('admin_notices', array( $this, 'premium_admin_notices'));
|
113 |
-
add_action('elementor/init', array($this, 'initiate_elementor_addons'));
|
114 |
-
add_action('elementor/widgets/widgets_registered', array($this, 'premium_addons_widget_register'));
|
115 |
-
add_action('elementor/frontend/after_register_scripts', array($this, 'premium_addons_register_scripts'));
|
116 |
-
add_action('elementor/frontend/after_register_styles', array($this, 'premium_addons_register_styles'));
|
117 |
-
add_action('elementor/editor/before_enqueue_scripts', array($this,'premium_maps_get_address'));
|
118 |
-
add_action('elementor/frontend/after_enqueue_styles', array($this, 'premium_addons_enqueue_styles'));
|
119 |
-
add_action('wp_enqueue_scripts', array($this, 'premium_maps_required_script'));
|
120 |
-
add_action('admin_post_premium_addons_rollback', 'post_premium_addons_rollback');
|
121 |
-
}
|
122 |
-
|
123 |
-
/**
|
124 |
-
* Shows an admin notice when Elementor is missing
|
125 |
-
*/
|
126 |
-
public function required_plugins_check() {
|
127 |
-
|
128 |
-
$elementor_path = 'elementor/elementor.php';
|
129 |
|
130 |
-
|
131 |
-
|
132 |
-
if ( ! is_plugin_installed( $elementor_path ) ) {
|
133 |
-
|
134 |
-
if( current_user_can( 'install_plugins' ) ) {
|
135 |
-
|
136 |
-
$install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' );
|
137 |
-
|
138 |
-
$message = __( '<p>Premium Addons for Elementor is not working because you need to Install Elementor plugin.</p>', 'premium-addons-for-elementor' );
|
139 |
-
|
140 |
-
$message .= sprintf( '<p><a href="%s" class="button-primary">%s</a></p>', $install_url, __( 'Install Now', 'premium-addons-for-elementor' ) );
|
141 |
-
|
142 |
-
$this->render_admin_notices( $message );
|
143 |
-
|
144 |
-
}
|
145 |
-
} else {
|
146 |
-
if( current_user_can( 'activate_plugins' ) ) {
|
147 |
-
|
148 |
-
$plugin = 'elementor/elementor.php';
|
149 |
-
|
150 |
-
$activation_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin );
|
151 |
-
|
152 |
-
$message = '<p>' . __( 'Premium Addons for Elementor is not working because you need to activate Elementor plugin.', 'premium-addons-for-elementor' ) . '</p>';
|
153 |
-
|
154 |
-
$message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $activation_url, __( 'Activate Now', 'premium-addons-for-elementor' ) ) . '</p>';
|
155 |
-
|
156 |
-
$this->render_admin_notices( $message );
|
157 |
-
}
|
158 |
-
}
|
159 |
-
}
|
160 |
-
}
|
161 |
-
|
162 |
-
/*
|
163 |
-
* Checks if review message is dismissed
|
164 |
-
*/
|
165 |
-
public function handle_review_notice() {
|
166 |
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
update_option( 'pa_review_notice', '1' );
|
175 |
-
}
|
176 |
-
|
177 |
-
wp_redirect( remove_query_arg( 'pa_review' ) );
|
178 |
-
exit;
|
179 |
-
|
180 |
-
}
|
181 |
-
|
182 |
-
/*
|
183 |
-
* Checks if get pro version message is dismissed
|
184 |
-
*/
|
185 |
-
public function handle_get_pro_notice() {
|
186 |
-
|
187 |
-
if ( ! isset( $_GET['get_pa_pro'] ) ) {
|
188 |
-
return;
|
189 |
-
}
|
190 |
-
|
191 |
-
if ( 'opt_out' === $_GET['get_pa_pro'] ) {
|
192 |
-
check_admin_referer( 'opt_out' );
|
193 |
-
|
194 |
-
update_option( 'get_pa_pro_notice', '1' );
|
195 |
-
}
|
196 |
-
|
197 |
-
wp_redirect( remove_query_arg( 'get_pa_pro' ) );
|
198 |
-
exit;
|
199 |
-
|
200 |
-
}
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Shows a dismissible admin notice to get Premium PRO version
|
204 |
-
*/
|
205 |
-
public function premium_admin_notices() {
|
206 |
-
|
207 |
-
$review = get_option( 'pa_review_notice' );
|
208 |
-
|
209 |
-
$review_url = 'https://wordpress.org/support/plugin/premium-addons-for-elementor/reviews/?filter=5';
|
210 |
-
|
211 |
-
if ( '1' === $review ) {
|
212 |
-
return;
|
213 |
-
} else if ( '1' !== $review ) {
|
214 |
-
$optout_url = wp_nonce_url( add_query_arg( 'pa_review', 'opt_out' ), 'opt_out' );
|
215 |
-
|
216 |
-
$review_message = sprintf( __('<p style="display: flex; align-items: center; padding:10px 10px 10px 0;"><img src="%s" style="margin-right: 0.8em; width: 40px;">Did you like<strong> Premium Addons for Elementor </strong>Plugin?<span> please help us by leaving a five star review on WordPress.org. </span><a href="%s" target="_blank" style="flex-grow: 2;">Leave a Review.</a>', 'premium-addons-for-elementor' ), PREMIUM_ADDONS_URL .'admin/images/premium-addons-logo.png' ,$review_url );
|
217 |
-
|
218 |
-
}
|
219 |
|
220 |
-
|
221 |
|
222 |
-
|
223 |
-
|
224 |
-
$pro_path = 'premium-addons-pro/premium-addons-pro-for-elementor.php';
|
225 |
-
|
226 |
-
$theme = $this->get_installed_theme();
|
227 |
-
|
228 |
-
$url = sprintf( 'https://premiumaddons.com/pro/?utm_source=notification&utm_medium=wp-dash&utm_campaign=get-pro&utm_term=%s', $theme );
|
229 |
-
|
230 |
-
if ( ! is_plugin_installed( $pro_path ) && current_user_can( 'install_plugins' ) ) {
|
231 |
-
|
232 |
-
$get_pro = get_option( 'get_pa_pro_notice' );
|
233 |
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
$optout_url = wp_nonce_url( add_query_arg( 'get_pa_pro', 'opt_out' ), 'opt_out' );
|
239 |
|
240 |
-
|
241 |
-
|
242 |
-
}
|
243 |
|
244 |
-
$message .= sprintf(__('<a href="%s" style="text-decoration: none; margin-left: 1em; float:right; "><span class="dashicons dashicons-dismiss"></span></a></p>', 'premium-addons-for-elementor'), $optout_url );
|
245 |
-
|
246 |
-
$this->render_admin_notices( $message );
|
247 |
-
|
248 |
-
|
249 |
}
|
250 |
-
}
|
251 |
-
|
252 |
-
/**
|
253 |
-
* Returns the active theme slug
|
254 |
-
*/
|
255 |
-
public function get_installed_theme() {
|
256 |
-
|
257 |
-
$theme = wp_get_theme();
|
258 |
-
|
259 |
-
if( $theme->parent() ) {
|
260 |
-
|
261 |
-
$theme_name = $theme->parent()->get('Name');
|
262 |
-
|
263 |
-
} else {
|
264 |
-
|
265 |
-
$theme_name = $theme->get('Name');
|
266 |
-
|
267 |
-
}
|
268 |
-
|
269 |
-
$theme_name = sanitize_key( $theme_name );
|
270 |
-
|
271 |
-
return $theme_name;
|
272 |
-
}
|
273 |
-
|
274 |
-
/**
|
275 |
-
* Renders an admin notice error message
|
276 |
-
*/
|
277 |
-
public function render_admin_notices( $message ) {
|
278 |
-
?>
|
279 |
-
<div class="error pa-notice-wrap">
|
280 |
-
<?php echo $message; ?>
|
281 |
-
</div>
|
282 |
-
<?php
|
283 |
-
|
284 |
-
}
|
285 |
-
|
286 |
-
/**
|
287 |
-
* Register all frontend stylesheets
|
288 |
-
*/
|
289 |
-
public function premium_addons_register_styles(){
|
290 |
-
|
291 |
-
wp_register_style('premium-addons', PREMIUM_ADDONS_URL . 'assets/css/premium-addons.css', array(), PREMIUM_ADDONS_VERSION, 'all');
|
292 |
-
|
293 |
-
$check_grid_active = isset(get_option('pa_save_settings')['premium-grid']) ? get_option('pa_save_settings')['premium-grid']: true;
|
294 |
|
295 |
-
|
296 |
-
|
297 |
-
wp_register_style('pa-prettyphoto', PREMIUM_ADDONS_URL . 'assets/css/prettyphoto.css', array(), PREMIUM_ADDONS_VERSION, 'all');
|
298 |
-
|
299 |
}
|
300 |
-
|
301 |
-
|
|
|
|
|
|
|
|
|
|
|
302 |
|
303 |
-
|
304 |
-
* Enqueue all frontend stylesheets
|
305 |
-
*/
|
306 |
-
public function premium_addons_enqueue_styles(){
|
307 |
-
|
308 |
-
wp_enqueue_style('premium-addons');
|
309 |
-
|
310 |
-
$check_grid_active = isset(get_option('pa_save_settings')['premium-grid']) ? get_option('pa_save_settings')['premium-grid']: true;
|
311 |
-
|
312 |
-
if($check_grid_active){
|
313 |
|
314 |
-
|
315 |
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
public function premium_maps_required_script() {
|
323 |
-
|
324 |
-
$premium_maps_api = get_option('pa_maps_save_settings')['premium-map-api'];
|
325 |
-
|
326 |
-
$premium_maps_disable_api = get_option('pa_maps_save_settings')['premium-map-disable-api'];
|
327 |
-
|
328 |
-
$premium_maps_enabled = isset( get_option('pa_save_settings')['premium-maps'] ) ? get_option('pa_save_settings')['premium-maps'] : 1;
|
329 |
-
|
330 |
-
if( $premium_maps_disable_api ) {
|
331 |
-
|
332 |
-
wp_enqueue_script('premium-maps-api-js', 'https://maps.googleapis.com/maps/api/js?key=' . $premium_maps_api, array(), PREMIUM_ADDONS_VERSION, false);
|
333 |
-
|
334 |
}
|
335 |
|
336 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
337 |
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
343 |
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
$premium_maps_disable_api = get_option('pa_maps_save_settings')['premium-map-disable-api'];
|
349 |
-
|
350 |
-
$map_enabled = get_option('pa_save_settings')['premium-maps'];
|
351 |
-
|
352 |
-
$premium_maps_enabled = isset( $map_enabled ) ? $map_enabled : 1;
|
353 |
-
|
354 |
-
if ( $premium_maps_disable_api ) {
|
355 |
-
|
356 |
-
wp_enqueue_script('premium-maps-api-js', 'https://maps.googleapis.com/maps/api/js?key=' . $premium_maps_api, array(), PREMIUM_ADDONS_VERSION, false);
|
357 |
|
358 |
}
|
359 |
-
|
360 |
-
if( $premium_maps_enabled ) {
|
361 |
-
|
362 |
-
wp_enqueue_script('premium-maps-address', PREMIUM_ADDONS_URL . 'assets/js/premium-maps-address.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
363 |
-
|
364 |
-
}
|
365 |
-
|
366 |
-
}
|
367 |
-
|
368 |
-
/**
|
369 |
-
* Load only the required javascript files
|
370 |
-
*/
|
371 |
-
public function premium_addons_register_scripts() {
|
372 |
-
|
373 |
-
$pa_default_settings = array_fill_keys( $this->pa_elements_keys, true );
|
374 |
-
|
375 |
-
$check_component_active = get_option('pa_save_settings', $pa_default_settings);
|
376 |
-
|
377 |
-
if ($check_component_active['premium-progressbar']) {
|
378 |
-
wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
379 |
-
}
|
380 |
-
if ($check_component_active['premium-videobox']) {
|
381 |
-
wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
382 |
-
}
|
383 |
-
if ($check_component_active['premium-grid']) {
|
384 |
-
wp_register_script('isotope-js', PREMIUM_ADDONS_URL . 'assets/js/lib/isotope.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
385 |
-
wp_register_script('prettyPhoto-js', PREMIUM_ADDONS_URL . 'assets/js/lib/prettyPhoto.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
386 |
-
wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
387 |
-
}
|
388 |
-
if ($check_component_active['premium-counter']) {
|
389 |
-
wp_register_script('counter-up-js', PREMIUM_ADDONS_URL . 'assets/js/lib/countUpmin.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
390 |
-
}
|
391 |
-
if ($check_component_active['premium-fancytext']) {
|
392 |
-
wp_register_script('vticker-js', PREMIUM_ADDONS_URL . 'assets/js/lib/Vticker.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
393 |
-
wp_register_script('typed-js', PREMIUM_ADDONS_URL . 'assets/js/lib/typedmin.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
394 |
-
wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
395 |
-
}
|
396 |
-
if ($check_component_active['premium-countdown']) {
|
397 |
-
wp_register_script('count-down-timer-js', PREMIUM_ADDONS_URL . 'assets/js/lib/jquerycountdown.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
398 |
-
wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
399 |
-
}
|
400 |
-
if ($check_component_active['premium-carousel']) {
|
401 |
-
wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
402 |
-
wp_register_script('slick-carousel-js', PREMIUM_ADDONS_URL . 'assets/js/lib/slickmin.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
403 |
-
}
|
404 |
-
if ($check_component_active['premium-banner']) {
|
405 |
-
wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
406 |
-
}
|
407 |
-
if ($check_component_active['premium-modalbox']) {
|
408 |
-
wp_register_script('modal-js', PREMIUM_ADDONS_URL . 'assets/js/lib/modal.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
409 |
-
wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
410 |
-
}
|
411 |
-
if ($check_component_active['premium-maps']) {
|
412 |
-
wp_register_script('premium-maps-js', PREMIUM_ADDONS_URL . 'assets/js/premium-maps.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
413 |
-
}
|
414 |
-
if ($check_component_active['premium-blog']) {
|
415 |
-
wp_register_script('isotope-js', PREMIUM_ADDONS_URL . 'assets/js/lib/isotope.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
416 |
-
wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
|
417 |
-
}
|
418 |
-
}
|
419 |
-
|
420 |
-
/**
|
421 |
-
* Load only the enabled widgets
|
422 |
-
*/
|
423 |
-
public function premium_addons_widget_register() {
|
424 |
-
|
425 |
-
$this->initiate_elementor_addons();
|
426 |
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
require_once (PREMIUM_ADDONS_PATH . '
|
445 |
-
}
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
}
|
467 |
-
if ($check_component_active['premium-videobox']) {
|
468 |
-
require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-videobox.php');
|
469 |
-
}
|
470 |
-
if ($check_component_active['premium-pricing-table']) {
|
471 |
-
require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-pricing-table.php');
|
472 |
-
}
|
473 |
-
if ($check_component_active['premium-blog']) {
|
474 |
-
require_once (PREMIUM_ADDONS_PATH . 'queries.php');
|
475 |
-
require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-blog.php');
|
476 |
-
}
|
477 |
-
if ($check_component_active['premium-person']) {
|
478 |
-
require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-person.php');
|
479 |
-
}
|
480 |
-
if ($check_component_active['premium-maps']) {
|
481 |
-
require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-maps.php');
|
482 |
-
}
|
483 |
-
if ($check_component_active['premium-dual-header']) {
|
484 |
-
require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-dual-header.php');
|
485 |
-
}
|
486 |
-
if ($check_component_active['premium-button']) {
|
487 |
-
require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-button.php');
|
488 |
-
}
|
489 |
-
if (function_exists('wpcf7') && $check_component_active['premium-contactform']) {
|
490 |
-
require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-contactform.php');
|
491 |
-
}
|
492 |
-
if ($check_component_active['premium-image-button']) {
|
493 |
-
require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-image-button.php');
|
494 |
-
}
|
495 |
-
if ($check_component_active['premium-grid']) {
|
496 |
-
require_once (PREMIUM_ADDONS_PATH . 'widgets/premium-grid.php');
|
497 |
}
|
498 |
-
|
499 |
-
}
|
500 |
|
501 |
-
public function initiate_elementor_addons() {
|
502 |
-
Elementor\Plugin::instance()->elements_manager->add_category(
|
503 |
-
'premium-elements',
|
504 |
-
array(
|
505 |
-
'title' => \PremiumAddons\Helper_Functions::get_category()
|
506 |
-
),
|
507 |
-
1);
|
508 |
}
|
509 |
}
|
510 |
|
511 |
-
if ( ! function_exists( '
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
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.6.7
|
7 |
Author: Leap13
|
8 |
Author URI: http://leap13.com/
|
9 |
Text Domain: premium-addons-for-elementor
|
15 |
/**
|
16 |
* Checking if WordPress is installed
|
17 |
*/
|
18 |
+
if (! function_exists('add_action')) {
|
19 |
die('WordPress not Installed'); // if WordPress not installed kill the page.
|
20 |
}
|
21 |
|
22 |
+
if ( ! defined('ABSPATH') ) exit; // No access of directly access
|
23 |
|
24 |
|
25 |
+
define('PREMIUM_ADDONS_VERSION', '2.6.7');
|
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.6.6');
|
31 |
|
32 |
+
if( ! class_exists('Premium_Addons_Elementor') ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
/*
|
34 |
+
* Intialize and Sets up the plugin
|
|
|
|
|
|
|
35 |
*/
|
36 |
+
class Premium_Addons_Elementor {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
+
private static $instance = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
+
/**
|
41 |
+
* Sets up needed actions/filters for the plug-in to initialize.
|
42 |
+
* @since 1.0.0
|
43 |
+
* @access public
|
44 |
+
* @return void
|
45 |
+
*/
|
46 |
+
public function __construct() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
+
add_action('plugins_loaded', array( $this, 'premium_addons_elementor_setup') );
|
49 |
|
50 |
+
register_activation_hook(__FILE__, array( $this, 'pa_activation') );
|
51 |
+
add_action('admin_init', array( $this, 'pa_redirection' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
+
add_action('elementor/init', array( $this, 'create_premium_category') );
|
54 |
+
|
55 |
+
add_action( 'init', array( $this, 'init_addons' ) );
|
|
|
|
|
56 |
|
57 |
+
add_action( 'admin_post_premium_addons_rollback', 'post_premium_addons_rollback' );
|
|
|
|
|
58 |
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
+
public function pa_activation() {
|
62 |
+
add_option('pa_activation_redirect', true);
|
|
|
|
|
63 |
}
|
64 |
+
|
65 |
+
/*
|
66 |
+
* Redirects to Premium Widgets Settings settings after activation
|
67 |
+
* @since 1.0.0
|
68 |
+
* @return void
|
69 |
+
*/
|
70 |
+
public function pa_redirection() {
|
71 |
|
72 |
+
if ( get_option('pa_activation_redirect', false ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
+
delete_option('pa_activation_redirect');
|
75 |
|
76 |
+
if ( ! is_network_admin() ) {
|
77 |
+
|
78 |
+
wp_redirect("admin.php?page=premium-addons");
|
79 |
+
|
80 |
+
}
|
81 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
}
|
83 |
|
84 |
+
/**
|
85 |
+
* Installs translation text domain and checks if Elementor is installed
|
86 |
+
* @since 1.0.0
|
87 |
+
* @access public
|
88 |
+
* @return void
|
89 |
+
*/
|
90 |
+
public function premium_addons_elementor_setup() {
|
91 |
+
$this->load_domain();
|
92 |
|
93 |
+
$this->init_files();
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Require initial necessary files
|
98 |
+
* @since 2.6.8
|
99 |
+
* @access public
|
100 |
+
* @return void
|
101 |
+
*/
|
102 |
+
public function init_files(){
|
103 |
+
if ( is_admin() ) {
|
104 |
+
require_once (PREMIUM_ADDONS_PATH . 'includes/system-info.php');
|
105 |
+
require_once (PREMIUM_ADDONS_PATH . 'includes/maintenance.php');
|
106 |
+
require_once (PREMIUM_ADDONS_PATH . 'includes/rollback.php');
|
107 |
+
require_once (PREMIUM_ADDONS_PATH . 'includes/class-beta-testers.php');
|
108 |
+
require_once (PREMIUM_ADDONS_PATH . 'plugin.php');
|
109 |
+
require_once (PREMIUM_ADDONS_PATH . 'admin/includes/notices.php' );
|
110 |
+
require_once (PREMIUM_ADDONS_PATH . 'admin/settings/about.php');
|
111 |
+
require_once (PREMIUM_ADDONS_PATH . 'admin/settings/version-control.php');
|
112 |
+
require_once (PREMIUM_ADDONS_PATH . 'admin/settings/sys-info.php');
|
113 |
+
require_once (PREMIUM_ADDONS_PATH . 'admin/settings/gopro.php');
|
114 |
+
$beta_testers = new Premium_Beta_Testers();
|
115 |
+
}
|
116 |
|
117 |
+
require_once (PREMIUM_ADDONS_PATH . 'includes/helper-functions.php');
|
118 |
+
require_once (PREMIUM_ADDONS_PATH . 'admin/settings/gomaps.php');
|
119 |
+
require_once (PREMIUM_ADDONS_PATH . 'admin/settings/elements.php');
|
120 |
+
require_once (PREMIUM_ADDONS_PATH . 'elementor-helper.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
|
122 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
|
124 |
+
/**
|
125 |
+
* Load plugin translated strings using text domain
|
126 |
+
* @since 2.6.8
|
127 |
+
* @access public
|
128 |
+
* @return void
|
129 |
+
*/
|
130 |
+
public function load_domain() {
|
131 |
+
load_plugin_textdomain('premium-addons-for-elementor', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/');
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Creates Premium Widgets category
|
136 |
+
* @since 2.6.8
|
137 |
+
* @access public
|
138 |
+
* @return void
|
139 |
+
*/
|
140 |
+
public function create_premium_category() {
|
141 |
+
require_once ( PREMIUM_ADDONS_PATH . 'includes/class-addons-category.php' );
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Load required file for addons integration
|
146 |
+
* @return void
|
147 |
+
*/
|
148 |
+
public function init_addons() {
|
149 |
+
require_once ( PREMIUM_ADDONS_PATH . 'includes/class-addons-integration.php' );
|
150 |
+
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Creates and returns an instance of the class
|
154 |
+
* @since 2.6.8
|
155 |
+
* @access public
|
156 |
+
* return object
|
157 |
+
*/
|
158 |
+
public static function get_instance(){
|
159 |
+
if( self::$instance == null ) {
|
160 |
+
self::$instance = new self;
|
161 |
+
}
|
162 |
+
return self::$instance;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
}
|
|
|
|
|
164 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
}
|
166 |
}
|
167 |
|
168 |
+
if ( ! function_exists( 'premium_addons' ) ) {
|
169 |
+
/**
|
170 |
+
* Returns an instance of the plugin class.
|
171 |
+
* @since 1.0.0
|
172 |
+
* @return object
|
173 |
+
*/
|
174 |
+
function premium_addons() {
|
175 |
+
return Premium_Addons_Elementor::get_instance();
|
176 |
+
}
|
177 |
+
}
|
178 |
+
premium_addons();
|
readme.txt
CHANGED
@@ -5,14 +5,14 @@ Donate link: http://premiumaddons.com
|
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 4.9.8
|
7 |
Requires PHP: 5.4
|
8 |
-
Stable tag: 2.6.
|
9 |
License: GPL v3.0
|
10 |
License URI: https://opensource.org/licenses/GPL-3.0
|
11 |
|
12 |
-
|
13 |
|
14 |
== Description ==
|
15 |
-
|
16 |
|
17 |
Premium Addons for elementor plugin’s widgets & addons are cross browser compatible and also fully responsive, Your website will rock on all browsers as well as tables and mobile devices.
|
18 |
|
@@ -27,8 +27,7 @@ Premium Addons for Elementor can be used only as a complement of Elementor page
|
|
27 |
* Options panel for enabling desired widgets only for faster performance.
|
28 |
* Free Support through online forums and our Facebook group.
|
29 |
* Fully Responsive and Cross Browser Compatible, Tested By [Browserstack](https://www.browserstack.com)
|
30 |
-
|
31 |
-
>Enable/disable specific elements and their related CSS and JS files to prevent overloading your site.
|
32 |
|
33 |
|
34 |
### Available Elements
|
@@ -135,6 +134,12 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
|
|
135 |
|
136 |
== Changelog ==
|
137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
= 2.6.6 =
|
139 |
|
140 |
- Tweak: Premium Image Button widget performance enhanced.
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 4.9.8
|
7 |
Requires PHP: 5.4
|
8 |
+
Stable tag: 2.6.7
|
9 |
License: GPL v3.0
|
10 |
License URI: https://opensource.org/licenses/GPL-3.0
|
11 |
|
12 |
+
Elementor Widgets and Addons like Grid, Modal Box, Carousel, Google Maps, Pricing Tables, Countdown, Testimonials, Blog, and much more.
|
13 |
|
14 |
== Description ==
|
15 |
+
Premium Elementor addons & widgets with numerous customization options that extends Elementor Page Builder capabilities to help you build impressive websites with no coding required. Click [Here](https://premiumaddons.com/) to check addon elements’ demos.
|
16 |
|
17 |
Premium Addons for elementor plugin’s widgets & addons are cross browser compatible and also fully responsive, Your website will rock on all browsers as well as tables and mobile devices.
|
18 |
|
27 |
* Options panel for enabling desired widgets only for faster performance.
|
28 |
* Free Support through online forums and our Facebook group.
|
29 |
* Fully Responsive and Cross Browser Compatible, Tested By [Browserstack](https://www.browserstack.com)
|
30 |
+
* Enable/disable specific elements and their related CSS and JS files to prevent overloading your site.
|
|
|
31 |
|
32 |
|
33 |
### Available Elements
|
134 |
|
135 |
== Changelog ==
|
136 |
|
137 |
+
= 2.6.7 =
|
138 |
+
|
139 |
+
- Tweak: Premium Testimonials widget performance enhanced.
|
140 |
+
- Tweak: Plugin core enhancement for faster performance.
|
141 |
+
- Fixed: Conflict with 'Pods – Custom Content Types and Fields' plugin.
|
142 |
+
|
143 |
= 2.6.6 =
|
144 |
|
145 |
- Tweak: Premium Image Button widget performance enhanced.
|
widgets/premium-banner.php
CHANGED
@@ -3,7 +3,7 @@ namespace Elementor;
|
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
-
class
|
7 |
|
8 |
protected $templateInstance;
|
9 |
|
@@ -827,6 +827,4 @@ class Premium_Banner_Widget extends Widget_Base {
|
|
827 |
|
828 |
<?php
|
829 |
}
|
830 |
-
}
|
831 |
-
|
832 |
-
Plugin::instance()->widgets_manager->register_widget_type( new Premium_Banner_Widget() );
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
+
class Premium_Banner extends Widget_Base {
|
7 |
|
8 |
protected $templateInstance;
|
9 |
|
827 |
|
828 |
<?php
|
829 |
}
|
830 |
+
}
|
|
|
|
widgets/premium-blog.php
CHANGED
@@ -5,8 +5,7 @@ use Elementor\Core\Responsive\Responsive;
|
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
7 |
|
8 |
-
class
|
9 |
-
{
|
10 |
public function get_name() {
|
11 |
return 'premium-addon-blog';
|
12 |
}
|
@@ -838,8 +837,7 @@ class Premium_Blog_Widget extends Widget_Base
|
|
838 |
|
839 |
}
|
840 |
|
841 |
-
protected function render(
|
842 |
-
{
|
843 |
|
844 |
if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } else if ( get_query_var('page') ) { $paged = get_query_var('page'); } else { $paged = 1; }
|
845 |
|
@@ -983,16 +981,12 @@ if(count($posts)){
|
|
983 |
}
|
984 |
?>
|
985 |
</div>
|
986 |
-
<?php
|
987 |
-
|
988 |
echo $this->get_blog_responsive_style();
|
989 |
wp_reset_postdata();
|
990 |
|
991 |
-
}
|
992 |
-
|
993 |
-
|
994 |
|
995 |
-
<?php
|
996 |
}
|
997 |
}
|
998 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Blog_Widget());
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
7 |
|
8 |
+
class Premium_Blog extends Widget_Base {
|
|
|
9 |
public function get_name() {
|
10 |
return 'premium-addon-blog';
|
11 |
}
|
837 |
|
838 |
}
|
839 |
|
840 |
+
protected function render() {
|
|
|
841 |
|
842 |
if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } else if ( get_query_var('page') ) { $paged = get_query_var('page'); } else { $paged = 1; }
|
843 |
|
981 |
}
|
982 |
?>
|
983 |
</div>
|
984 |
+
<?php
|
985 |
+
endif;
|
986 |
echo $this->get_blog_responsive_style();
|
987 |
wp_reset_postdata();
|
988 |
|
989 |
+
}
|
|
|
|
|
990 |
|
|
|
991 |
}
|
992 |
}
|
|
widgets/premium-button.php
CHANGED
@@ -3,8 +3,7 @@ namespace Elementor;
|
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
-
class
|
7 |
-
{
|
8 |
public function get_name() {
|
9 |
return 'premium-addon-button';
|
10 |
}
|
@@ -883,5 +882,4 @@ class Premium_Button_Widget extends Widget_Base
|
|
883 |
|
884 |
<?php
|
885 |
}
|
886 |
-
}
|
887 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Button_Widget());
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
+
class Premium_Button extends Widget_Base {
|
|
|
7 |
public function get_name() {
|
8 |
return 'premium-addon-button';
|
9 |
}
|
882 |
|
883 |
<?php
|
884 |
}
|
885 |
+
}
|
|
widgets/premium-carousel.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
namespace Elementor;
|
3 |
if( !defined( 'ABSPATH' ) ) exit; // No access of directly access
|
4 |
|
5 |
-
class
|
6 |
|
7 |
protected $templateInstance;
|
8 |
|
@@ -962,5 +962,4 @@ class Premium_Carousel_Widget extends Widget_Base {
|
|
962 |
</style>
|
963 |
<?php
|
964 |
}
|
965 |
-
}
|
966 |
-
Plugin::instance()->widgets_manager->register_widget_type( new Premium_Carousel_Widget() );
|
2 |
namespace Elementor;
|
3 |
if( !defined( 'ABSPATH' ) ) exit; // No access of directly access
|
4 |
|
5 |
+
class Premium_Carousel extends Widget_Base {
|
6 |
|
7 |
protected $templateInstance;
|
8 |
|
962 |
</style>
|
963 |
<?php
|
964 |
}
|
965 |
+
}
|
|
widgets/premium-contactform.php
CHANGED
@@ -3,7 +3,7 @@ namespace Elementor;
|
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
-
class
|
7 |
|
8 |
public function get_name() {
|
9 |
return 'premium-contact-form';
|
@@ -591,23 +591,20 @@ class Premium_ContactForm7_Widget extends Widget_Base {
|
|
591 |
<div class="premium-elements-contact-form-container <?php echo $settings['premium_elements_input_focus_border_animation'] ?> ">
|
592 |
|
593 |
<?php echo do_shortcode( '[contact-form-7 id="' . $settings['premium_wpcf7_form'] . '" ]' );?>
|
594 |
-
</div
|
595 |
-
<script>
|
596 |
-
|
597 |
var linput = jQuery( 'body input[type="text"], body input[type="email"], body textarea , body input[type="password"], body input[type="date"], body input[type="number"], body input[type="tel"], body input[type="file"], body input[type="url"]');
|
598 |
linput.wrap("<span class='wpcf7-span'>")
|
599 |
|
600 |
-
|
601 |
-
var linput = jQuery( 'body input[type="text"], body input[type="email"], body textarea , body input[type="password"], body input[type="date"], body input[type="number"], body input[type="tel"], body input[type="file"], body input[type="url"]');
|
602 |
linput.on("focus blur", function(){
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
</script>
|
607 |
<?php
|
608 |
}
|
609 |
|
610 |
}
|
611 |
-
}
|
612 |
-
|
613 |
-
Plugin::instance()->widgets_manager->register_widget_type( new Premium_ContactForm7_Widget() );
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
+
class Premium_Contactform extends Widget_Base {
|
7 |
|
8 |
public function get_name() {
|
9 |
return 'premium-contact-form';
|
591 |
<div class="premium-elements-contact-form-container <?php echo $settings['premium_elements_input_focus_border_animation'] ?> ">
|
592 |
|
593 |
<?php echo do_shortcode( '[contact-form-7 id="' . $settings['premium_wpcf7_form'] . '" ]' );?>
|
594 |
+
</div>
|
595 |
+
<script>
|
596 |
+
jQuery(function($){
|
597 |
var linput = jQuery( 'body input[type="text"], body input[type="email"], body textarea , body input[type="password"], body input[type="date"], body input[type="number"], body input[type="tel"], body input[type="file"], body input[type="url"]');
|
598 |
linput.wrap("<span class='wpcf7-span'>")
|
599 |
|
600 |
+
var linput = jQuery( 'body input[type="text"], body input[type="email"], body textarea , body input[type="password"], body input[type="date"], body input[type="number"], body input[type="tel"], body input[type="file"], body input[type="url"]');
|
|
|
601 |
linput.on("focus blur", function(){
|
602 |
+
$(this).closest(".wpcf7-span").toggleClass("is-focused");
|
603 |
+
});
|
604 |
+
});
|
605 |
+
</script>
|
606 |
<?php
|
607 |
}
|
608 |
|
609 |
}
|
610 |
+
}
|
|
|
|
widgets/premium-countdown.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
namespace Elementor;
|
3 |
if( !defined( 'ABSPATH' ) ) exit; // No access of directly access
|
4 |
|
5 |
-
class
|
6 |
public function get_name() {
|
7 |
return 'premium-countdown-timer';
|
8 |
}
|
@@ -534,6 +534,4 @@ class Premium_Counter_Down_Widget extends Widget_Base {
|
|
534 |
</div>
|
535 |
<?php
|
536 |
}
|
537 |
-
}
|
538 |
-
|
539 |
-
Plugin::instance()->widgets_manager->register_widget_type( new Premium_Counter_Down_Widget() );
|
2 |
namespace Elementor;
|
3 |
if( !defined( 'ABSPATH' ) ) exit; // No access of directly access
|
4 |
|
5 |
+
class Premium_Countdown extends Widget_Base {
|
6 |
public function get_name() {
|
7 |
return 'premium-countdown-timer';
|
8 |
}
|
534 |
</div>
|
535 |
<?php
|
536 |
}
|
537 |
+
}
|
|
|
|
widgets/premium-counter.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
namespace Elementor;
|
3 |
-
if( !defined( 'ABSPATH' ) ) exit; // No access of directly access
|
4 |
|
|
|
5 |
|
6 |
-
class
|
7 |
|
8 |
public function get_name() {
|
9 |
return 'premium-counter';
|
@@ -577,6 +577,4 @@ class Premium_Counter_Widget extends Widget_Base {
|
|
577 |
|
578 |
<?php
|
579 |
}
|
580 |
-
}
|
581 |
-
|
582 |
-
Plugin::instance()->widgets_manager->register_widget_type( new Premium_Counter_Widget() );
|
1 |
<?php
|
2 |
namespace Elementor;
|
|
|
3 |
|
4 |
+
if( !defined( 'ABSPATH' ) ) exit; // No access of directly access
|
5 |
|
6 |
+
class Premium_Counter extends Widget_Base {
|
7 |
|
8 |
public function get_name() {
|
9 |
return 'premium-counter';
|
577 |
|
578 |
<?php
|
579 |
}
|
580 |
+
}
|
|
|
|
widgets/premium-dual-header.php
CHANGED
@@ -3,8 +3,7 @@ namespace Elementor;
|
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
-
class
|
7 |
-
{
|
8 |
protected $templateInstance;
|
9 |
|
10 |
public function getTemplateInstance(){
|
@@ -588,5 +587,4 @@ class Premium_Dual_Header_Widget extends Widget_Base
|
|
588 |
|
589 |
<?php
|
590 |
}
|
591 |
-
}
|
592 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Dual_Header_Widget());
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
+
class Premium_Dual_Header extends Widget_Base {
|
|
|
7 |
protected $templateInstance;
|
8 |
|
9 |
public function getTemplateInstance(){
|
587 |
|
588 |
<?php
|
589 |
}
|
590 |
+
}
|
|
widgets/premium-fancytext.php
CHANGED
@@ -3,8 +3,7 @@ namespace Elementor;
|
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
-
class
|
7 |
-
{
|
8 |
public function get_name() {
|
9 |
return 'premium-addon-fancy-text';
|
10 |
}
|
@@ -497,5 +496,4 @@ class Premium_Fancy_Text_Widget extends Widget_Base
|
|
497 |
</div>
|
498 |
<?php
|
499 |
}
|
500 |
-
}
|
501 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Fancy_Text_Widget());
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
+
class Premium_Fancytext extends Widget_Base {
|
|
|
7 |
public function get_name() {
|
8 |
return 'premium-addon-fancy-text';
|
9 |
}
|
496 |
</div>
|
497 |
<?php
|
498 |
}
|
499 |
+
}
|
|
widgets/premium-grid.php
CHANGED
@@ -4,7 +4,7 @@ namespace Elementor;
|
|
4 |
|
5 |
if( !defined( 'ABSPATH' ) ) exit;
|
6 |
|
7 |
-
class
|
8 |
|
9 |
public function get_name(){
|
10 |
return 'premium-img-gallery';
|
@@ -1321,5 +1321,4 @@ class Premium_Image_Gallery_Widget extends Widget_Base {
|
|
1321 |
</style>
|
1322 |
<?php endif; ?>
|
1323 |
<?php }
|
1324 |
-
}
|
1325 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Image_Gallery_Widget());
|
4 |
|
5 |
if( !defined( 'ABSPATH' ) ) exit;
|
6 |
|
7 |
+
class Premium_Grid extends Widget_Base {
|
8 |
|
9 |
public function get_name(){
|
10 |
return 'premium-img-gallery';
|
1321 |
</style>
|
1322 |
<?php endif; ?>
|
1323 |
<?php }
|
1324 |
+
}
|
|
widgets/premium-image-button.php
CHANGED
@@ -3,8 +3,7 @@ namespace Elementor;
|
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
-
class
|
7 |
-
{
|
8 |
public function get_name() {
|
9 |
return 'premium-addon-image-button';
|
10 |
}
|
@@ -847,5 +846,4 @@ class Premium_Image_Button_Widget extends Widget_Base
|
|
847 |
|
848 |
<?php
|
849 |
}
|
850 |
-
}
|
851 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Image_Button_Widget());
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
+
class Premium_Image_Button extends Widget_Base {
|
|
|
7 |
public function get_name() {
|
8 |
return 'premium-addon-image-button';
|
9 |
}
|
846 |
|
847 |
<?php
|
848 |
}
|
849 |
+
}
|
|
widgets/{premium-imageseparator.php → premium-image-separator.php}
RENAMED
@@ -3,8 +3,7 @@ namespace Elementor;
|
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
-
class
|
7 |
-
{
|
8 |
protected $templateInstance;
|
9 |
|
10 |
public function getTemplateInstance() {
|
@@ -253,5 +252,4 @@ class Premium_Image_Separator_Widget extends Widget_Base
|
|
253 |
|
254 |
<?php
|
255 |
}
|
256 |
-
}
|
257 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Image_Separator_Widget());
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
+
class Premium_Image_Separator extends Widget_Base {
|
|
|
7 |
protected $templateInstance;
|
8 |
|
9 |
public function getTemplateInstance() {
|
252 |
|
253 |
<?php
|
254 |
}
|
255 |
+
}
|
|
widgets/premium-maps.php
CHANGED
@@ -3,8 +3,7 @@ namespace Elementor;
|
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
-
class
|
7 |
-
{
|
8 |
public function get_name() {
|
9 |
return 'premium-addon-maps';
|
10 |
}
|
@@ -682,5 +681,4 @@ class Premium_Maps_Widget extends Widget_Base
|
|
682 |
|
683 |
<?php
|
684 |
}
|
685 |
-
}
|
686 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Maps_Widget());
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
+
class Premium_Maps extends Widget_Base {
|
|
|
7 |
public function get_name() {
|
8 |
return 'premium-addon-maps';
|
9 |
}
|
681 |
|
682 |
<?php
|
683 |
}
|
684 |
+
}
|
|
widgets/premium-modalbox.php
CHANGED
@@ -3,8 +3,7 @@ namespace Elementor;
|
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
-
class
|
7 |
-
{
|
8 |
public function getTemplateInstance(){
|
9 |
return $this->templateInstance = premium_Template_Tags::getInstance();
|
10 |
}
|
@@ -1261,5 +1260,4 @@ class Premium_Modal_Box_Widget extends Widget_Base
|
|
1261 |
|
1262 |
<?php
|
1263 |
}
|
1264 |
-
}
|
1265 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Modal_Box_Widget());
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
+
class Premium_Modalbox extends Widget_Base {
|
|
|
7 |
public function getTemplateInstance(){
|
8 |
return $this->templateInstance = premium_Template_Tags::getInstance();
|
9 |
}
|
1260 |
|
1261 |
<?php
|
1262 |
}
|
1263 |
+
}
|
|
widgets/premium-person.php
CHANGED
@@ -3,8 +3,7 @@ namespace Elementor;
|
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
-
class
|
7 |
-
{
|
8 |
public function get_name() {
|
9 |
return 'premium-addon-person';
|
10 |
}
|
@@ -643,5 +642,4 @@ class Premium_Person_Widget extends Widget_Base
|
|
643 |
</div>
|
644 |
<?php
|
645 |
}
|
646 |
-
}
|
647 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Person_Widget());
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
+
class Premium_Person extends Widget_Base {
|
|
|
7 |
public function get_name() {
|
8 |
return 'premium-addon-person';
|
9 |
}
|
642 |
</div>
|
643 |
<?php
|
644 |
}
|
645 |
+
}
|
|
widgets/premium-pricing-table.php
CHANGED
@@ -3,8 +3,7 @@ namespace Elementor;
|
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
-
class
|
7 |
-
{
|
8 |
protected $templateInstance;
|
9 |
|
10 |
public function getTemplateInstance() {
|
@@ -1959,5 +1958,4 @@ class Premium_Pricing_Table_Widget extends Widget_Base
|
|
1959 |
</div>
|
1960 |
<?php
|
1961 |
}
|
1962 |
-
}
|
1963 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Pricing_Table_Widget());
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
+
class Premium_Pricing_Table extends Widget_Base {
|
|
|
7 |
protected $templateInstance;
|
8 |
|
9 |
public function getTemplateInstance() {
|
1958 |
</div>
|
1959 |
<?php
|
1960 |
}
|
1961 |
+
}
|
|
widgets/premium-progressbar.php
CHANGED
@@ -3,8 +3,7 @@ namespace Elementor;
|
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
-
class
|
7 |
-
{
|
8 |
public function get_name() {
|
9 |
return 'premium-addon-progressbar';
|
10 |
}
|
@@ -690,5 +689,4 @@ class Premium_Progressbar_Widget extends Widget_Base
|
|
690 |
</div>
|
691 |
<?php
|
692 |
}
|
693 |
-
}
|
694 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Progressbar_Widget());
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
+
class Premium_Progressbar extends Widget_Base {
|
|
|
7 |
public function get_name() {
|
8 |
return 'premium-addon-progressbar';
|
9 |
}
|
689 |
</div>
|
690 |
<?php
|
691 |
}
|
692 |
+
}
|
|
widgets/premium-testimonials.php
CHANGED
@@ -3,8 +3,7 @@ namespace Elementor;
|
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
-
class
|
7 |
-
{
|
8 |
public function get_name() {
|
9 |
return 'premium-addon-testimonials';
|
10 |
}
|
@@ -36,9 +35,9 @@ class Premium_Testimonials_Widget extends Widget_Base
|
|
36 |
[
|
37 |
'label' => esc_html__('Image','premium-addons-for-elementor'),
|
38 |
'type' => Controls_Manager::MEDIA,
|
39 |
-
'default'
|
40 |
-
'url'
|
41 |
-
|
42 |
'description' => esc_html__( 'Choose an image for the author', 'premium-addons-for-elementor' ),
|
43 |
'show_label' => true,
|
44 |
]
|
@@ -487,8 +486,7 @@ class Premium_Testimonials_Widget extends Widget_Base
|
|
487 |
|
488 |
}
|
489 |
|
490 |
-
protected function render(
|
491 |
-
{
|
492 |
// get our input from the widget settings.
|
493 |
$settings = $this->get_settings_for_display();
|
494 |
|
@@ -501,51 +499,102 @@ class Premium_Testimonials_Widget extends Widget_Base
|
|
501 |
|
502 |
if(!empty($settings['premium_testimonial_person_image']['url'])) {
|
503 |
$image_src = $settings['premium_testimonial_person_image']['url'];
|
504 |
-
} else {
|
505 |
-
$image_src = PREMIUM_ADDONS_URL. 'assets/images/person-image.jpg';
|
506 |
}
|
507 |
|
508 |
-
?>
|
509 |
|
510 |
-
|
511 |
-
<div class="premium-testimonial-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
<!-- Image Wrapper -->
|
517 |
-
<div class="premium-testimonial-img-wrapper" style="border-radius: <?php
|
518 |
-
if( $settings['premium_testimonial_person_image_shape'] === 'circle' ) : echo "50%;";
|
519 |
-
elseif ( $settings['premium_testimonial_person_image_shape'] === 'square' ) : echo "0;";
|
520 |
-
elseif ( $settings['premium_testimonial_person_image_shape'] === 'rounded' ) : echo "15px;";
|
521 |
-
endif;?>">
|
522 |
-
<img src="<?php echo $image_src; ?>" alt="premium-image" class="premium-testimonial-person-image"
|
523 |
-
style="border-radius: <?php
|
524 |
-
if ( $settings['premium_testimonial_person_image_shape'] === 'circle' ) : echo "50%;";
|
525 |
elseif ( $settings['premium_testimonial_person_image_shape'] === 'square' ) : echo "0;";
|
526 |
elseif ( $settings['premium_testimonial_person_image_shape'] === 'rounded' ) : echo "15px;";
|
527 |
-
endif
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
533 |
</div>
|
534 |
-
|
535 |
-
<!-- Person Name & Separator & Company Name-->
|
536 |
-
<span class="premium-testimonial-author-info">
|
537 |
-
<<?php echo $person_title_tag; ?> class="premium-testimonial-person-name"><span <?php echo $this->get_render_attribute_string('premium_testimonial_person_name'); ?>><?php echo $settings['premium_testimonial_person_name']; ?></span></<?php echo $person_title_tag; ?>><span class="premium-testimonial-separator"> - </span>
|
538 |
-
|
539 |
-
<<?php echo $company_title_tag; ?> class="premium-testimonial-company-name"><?php if($settings['premium_testimonial_company_link_switcher'] == 'yes') : ?><a class="premium-testimonial-company-link" href="<?php echo $settings['premium_testimonial_company_link']; ?>" target="_<?php echo $settings['premium_testimonial_link_target']; ?>"><span <?php echo $this->get_render_attribute_string('premium_testimonial_company_name'); ?>><?php echo $settings['premium_testimonial_company_name']; ?></span></a><?php else: ?><span class="premium-testimonial-company-link" <?php echo $this->get_render_attribute_string('premium_testimonial_company_name'); ?>><?php echo $settings['premium_testimonial_company_name']; ?></span><?php endif;?></<?php echo $company_title_tag; ?>>
|
540 |
-
|
541 |
-
|
542 |
-
</span>
|
543 |
</div>
|
544 |
-
|
545 |
-
<i class="fa fa-quote-right premium-testimonial-lower-quote"></i>
|
546 |
</div>
|
547 |
-
</div>
|
548 |
<?php
|
|
|
549 |
}
|
550 |
-
|
551 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
+
class Premium_Testimonials extends Widget_Base {
|
|
|
7 |
public function get_name() {
|
8 |
return 'premium-addon-testimonials';
|
9 |
}
|
35 |
[
|
36 |
'label' => esc_html__('Image','premium-addons-for-elementor'),
|
37 |
'type' => Controls_Manager::MEDIA,
|
38 |
+
'default' => [
|
39 |
+
'url' => Utils::get_placeholder_image_src()
|
40 |
+
],
|
41 |
'description' => esc_html__( 'Choose an image for the author', 'premium-addons-for-elementor' ),
|
42 |
'show_label' => true,
|
43 |
]
|
486 |
|
487 |
}
|
488 |
|
489 |
+
protected function render() {
|
|
|
490 |
// get our input from the widget settings.
|
491 |
$settings = $this->get_settings_for_display();
|
492 |
|
499 |
|
500 |
if(!empty($settings['premium_testimonial_person_image']['url'])) {
|
501 |
$image_src = $settings['premium_testimonial_person_image']['url'];
|
|
|
|
|
502 |
}
|
503 |
|
504 |
+
?>
|
505 |
|
506 |
+
<div class="premium-testimonial-Box">
|
507 |
+
<div class="premium-testimonial-container">
|
508 |
+
<i class="fa fa-quote-left premium-testimonial-upper-quote"></i>
|
509 |
+
<div class="premium-testimonial-content-wrapper">
|
510 |
+
<div class="premium-testimonial-img-wrapper" style="border-radius: <?php
|
511 |
+
if( $settings['premium_testimonial_person_image_shape'] === 'circle' ) : echo "50%;";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
512 |
elseif ( $settings['premium_testimonial_person_image_shape'] === 'square' ) : echo "0;";
|
513 |
elseif ( $settings['premium_testimonial_person_image_shape'] === 'rounded' ) : echo "15px;";
|
514 |
+
endif;?>">
|
515 |
+
<img src="<?php echo $image_src; ?>" alt="premium-image" class="premium-testimonial-person-image"
|
516 |
+
style="border-radius: <?php
|
517 |
+
if ( $settings['premium_testimonial_person_image_shape'] === 'circle' ) : echo "50%;";
|
518 |
+
elseif ( $settings['premium_testimonial_person_image_shape'] === 'square' ) : echo "0;";
|
519 |
+
elseif ( $settings['premium_testimonial_person_image_shape'] === 'rounded' ) : echo "15px;";
|
520 |
+
endif; ?>">
|
521 |
+
</div>
|
522 |
+
|
523 |
+
<div class="premium-testimonial-text-wrapper">
|
524 |
+
<div <?php echo $this->get_render_attribute_string('premium_testimonial_content'); ?>><?php echo $settings['premium_testimonial_content']; ?></div>
|
525 |
+
</div>
|
526 |
+
|
527 |
+
<span class="premium-testimonial-author-info">
|
528 |
+
<<?php echo $person_title_tag; ?> class="premium-testimonial-person-name"><span <?php echo $this->get_render_attribute_string('premium_testimonial_person_name'); ?>><?php echo $settings['premium_testimonial_person_name']; ?></span></<?php echo $person_title_tag; ?>><span class="premium-testimonial-separator"> - </span>
|
529 |
+
|
530 |
+
<<?php echo $company_title_tag; ?> class="premium-testimonial-company-name"><?php if($settings['premium_testimonial_company_link_switcher'] == 'yes') : ?><a class="premium-testimonial-company-link" href="<?php echo $settings['premium_testimonial_company_link']; ?>" target="_<?php echo $settings['premium_testimonial_link_target']; ?>"><span <?php echo $this->get_render_attribute_string('premium_testimonial_company_name'); ?>><?php echo $settings['premium_testimonial_company_name']; ?></span></a><?php else: ?><span class="premium-testimonial-company-link" <?php echo $this->get_render_attribute_string('premium_testimonial_company_name'); ?>><?php echo $settings['premium_testimonial_company_name']; ?></span><?php endif;?></<?php echo $company_title_tag; ?>>
|
531 |
+
</span>
|
532 |
</div>
|
533 |
+
<i class="fa fa-quote-right premium-testimonial-lower-quote"></i>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
534 |
</div>
|
|
|
|
|
535 |
</div>
|
|
|
536 |
<?php
|
537 |
+
|
538 |
}
|
539 |
+
|
540 |
+
protected function _content_template() {
|
541 |
+
?>
|
542 |
+
<#
|
543 |
+
|
544 |
+
view.addInlineEditingAttributes('premium_testimonial_person_name');
|
545 |
+
view.addInlineEditingAttributes('premium_testimonial_company_name');
|
546 |
+
view.addInlineEditingAttributes('premium_testimonial_content', 'advanced');
|
547 |
+
view.addRenderAttribute('premium_testimonial_company_name', 'class', 'premium-testimonial-company-link');
|
548 |
+
|
549 |
+
var personTag = settings.premium_testimonial_person_name_size,
|
550 |
+
companyTag = settings.premium_testimonial_company_name_size,
|
551 |
+
imageSrc,
|
552 |
+
borderRadius;
|
553 |
+
|
554 |
+
if( '' != settings.premium_testimonial_person_image.url ) {
|
555 |
+
imageSrc = settings.premium_testimonial_person_image.url;
|
556 |
+
}
|
557 |
+
|
558 |
+
|
559 |
+
if( 'circle' == settings.premium_testimonial_person_image_shape ) {
|
560 |
+
borderRadius = '50%;';
|
561 |
+
} else if ( 'square' == settings.premium_testimonial_person_image_shape ) {
|
562 |
+
borderRadius = '0;';
|
563 |
+
} else if ( 'rounded' == settings.premium_testimonial_person_image_shape ) {
|
564 |
+
borderRadius = '15px;';
|
565 |
+
}
|
566 |
+
|
567 |
+
|
568 |
+
#>
|
569 |
+
|
570 |
+
<div class="premium-testimonial-Box">
|
571 |
+
<div class="premium-testimonial-container">
|
572 |
+
<i class="fa fa-quote-left premium-testimonial-upper-quote"></i>
|
573 |
+
<div class="premium-testimonial-content-wrapper">
|
574 |
+
<div class="premium-testimonial-img-wrapper" style="border-radius: {{ borderRadius }}">
|
575 |
+
<img src="{{ imageSrc }}" alt="premium-image" class="premium-testimonial-person-image" style="border-radius: {{ borderRadius }}">
|
576 |
+
</div>
|
577 |
+
|
578 |
+
<div class="premium-testimonial-text-wrapper">
|
579 |
+
<div {{{ view.getRenderAttributeString('premium_testimonial_content') }}}>{{{ settings.premium_testimonial_content }}}</div>
|
580 |
+
</div>
|
581 |
+
|
582 |
+
<span class="premium-testimonial-author-info">
|
583 |
+
<{{{personTag}}} class="premium-testimonial-person-name"><span {{{ view.getRenderAttributeString('premium_testimonial_person_name') }}}>{{{ settings.premium_testimonial_person_name }}}</span></{{{personTag}}}><span class="premium-testimonial-separator"> - </span>
|
584 |
+
|
585 |
+
<{{{companyTag}}} class="premium-testimonial-company-name"><a href="{{ settings.premium_testimonial_company_link }}" {{{ view.getRenderAttributeString('premium_testimonial_company_name') }}}>{{{ settings.premium_testimonial_company_name }}}</a></{{{companyTag}}}>
|
586 |
+
</span>
|
587 |
+
|
588 |
+
</div>
|
589 |
+
|
590 |
+
<i class="fa fa-quote-right premium-testimonial-lower-quote"></i>
|
591 |
+
|
592 |
+
|
593 |
+
|
594 |
+
</div>
|
595 |
+
</div>
|
596 |
+
|
597 |
+
<?php
|
598 |
+
}
|
599 |
+
|
600 |
+
}
|
widgets/premium-title.php
CHANGED
@@ -3,8 +3,7 @@ namespace Elementor;
|
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
-
class
|
7 |
-
{
|
8 |
public function get_name() {
|
9 |
return 'premium-addon-title';
|
10 |
}
|
@@ -589,7 +588,6 @@ class Premium_Title_Widget extends Widget_Base
|
|
589 |
view.addRenderAttribute( 'premium_title', 'class', [ 'premium-title-header', 'premium-title-' + selectedStyle ] );
|
590 |
|
591 |
view.addRenderAttribute( 'premium_title_icon', 'class', [ 'premium-title-icon', titleIcon ] );
|
592 |
-
|
593 |
|
594 |
#>
|
595 |
<div {{{ view.getRenderAttributeString('premium_title_container') }}}>
|
@@ -606,5 +604,4 @@ class Premium_Title_Widget extends Widget_Base
|
|
606 |
|
607 |
<?php
|
608 |
}
|
609 |
-
}
|
610 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Title_Widget());
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
+
class Premium_Title extends Widget_Base {
|
|
|
7 |
public function get_name() {
|
8 |
return 'premium-addon-title';
|
9 |
}
|
588 |
view.addRenderAttribute( 'premium_title', 'class', [ 'premium-title-header', 'premium-title-' + selectedStyle ] );
|
589 |
|
590 |
view.addRenderAttribute( 'premium_title_icon', 'class', [ 'premium-title-icon', titleIcon ] );
|
|
|
591 |
|
592 |
#>
|
593 |
<div {{{ view.getRenderAttributeString('premium_title_container') }}}>
|
604 |
|
605 |
<?php
|
606 |
}
|
607 |
+
}
|
|
widgets/premium-videobox.php
CHANGED
@@ -3,8 +3,7 @@ namespace Elementor;
|
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
-
class
|
7 |
-
{
|
8 |
public function get_name() {
|
9 |
return 'premium-addon-video-box';
|
10 |
}
|
@@ -564,5 +563,4 @@ class Premium_Video_Box_Widget extends Widget_Base
|
|
564 |
|
565 |
<?php
|
566 |
}
|
567 |
-
}
|
568 |
-
Plugin::instance()->widgets_manager->register_widget_type(new Premium_Video_Box_Widget());
|
3 |
|
4 |
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
|
5 |
|
6 |
+
class Premium_Videobox extends Widget_Base {
|
|
|
7 |
public function get_name() {
|
8 |
return 'premium-addon-video-box';
|
9 |
}
|
563 |
|
564 |
<?php
|
565 |
}
|
566 |
+
}
|
|