Version Description
FIXED: user role permissions to manage popups
Download this release
Release Info
Developer | robertourbani |
Plugin | ITRO Popup Plugin |
Version | 5.2.1 |
Comparing to | |
See all releases |
Code changes from version 5.2 to 5.2.1
- admin/popup-admin.php +699 -564
- functions/core-function.php +32 -1
- mc-main.php +2 -2
- readme.txt +9 -3
admin/popup-admin.php
CHANGED
@@ -3,7 +3,9 @@
|
|
3 |
This file is part of ITRO Popup Plugin. (email : support@itroteam.com)
|
4 |
*/
|
5 |
|
6 |
-
if (
|
|
|
|
|
7 |
|
8 |
global $ITRO_VER;
|
9 |
|
@@ -11,589 +13,722 @@ $currentUser = wp_get_current_user();
|
|
11 |
global $wp_roles;
|
12 |
$userRoles = $currentUser->roles;
|
13 |
$allowedRoles = itro_get_option('roles');
|
14 |
-
if (
|
15 |
-
|
16 |
}
|
17 |
|
18 |
/* force table installation */
|
19 |
-
if(
|
20 |
-
{
|
21 |
// wp token check
|
22 |
-
check_admin_referer('ipp_save_data','ipp_cleardb_nonce_fld');
|
23 |
itro_db_init();
|
24 |
}
|
25 |
|
26 |
/* variables for the field and option names */
|
27 |
-
if(
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
}
|
73 |
|
74 |
/* ordered options */
|
75 |
-
for($i=0
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
// wp token check
|
82 |
-
check_admin_referer('ipp_save_data','ipp_sec_nonce_fld');
|
83 |
-
|
84 |
-
/* Read their posted value */
|
85 |
-
if(isset($_POST[$opt_name[$i]])){
|
86 |
-
$opt_val[$i] = ipp_validate_data($opt_name[$i], $_POST[$opt_name[$i]]);
|
87 |
-
}else{
|
88 |
-
$opt_val[$i] = NULL;
|
89 |
-
}
|
90 |
-
|
91 |
-
/* Save the posted value in the database */
|
92 |
-
itro_update_option( $opt_name[$i], $opt_val[$i] );
|
93 |
-
|
94 |
-
if( isset($_POST['select_' . $opt_name[$i]]) )
|
95 |
-
{
|
96 |
-
itro_update_option( 'select_' . $opt_name[$i], $_POST['select_' . $opt_name[$i]] );
|
97 |
-
|
98 |
-
$px_opt_val[$i] = ipp_validate_data('px_' . $opt_name[$i], $_POST['px_' . $opt_name[$i]]);
|
99 |
-
itro_update_option( 'px_' . $opt_name[$i], $_POST['px_' . $opt_name[$i]] );
|
100 |
-
$perc_opt_val[$i] = ipp_validate_data('perc_' . $opt_name[$i], $_POST['perc_' . $opt_name[$i]]);
|
101 |
-
itro_update_option( 'perc_' . $opt_name[$i], $_POST['perc_' . $opt_name[$i]] );
|
102 |
-
}
|
103 |
-
else{ itro_update_option( 'select_' . $opt_name[$i], NULL ); }
|
104 |
-
}else{
|
105 |
-
/* Read in existing option value from database */
|
106 |
-
$opt_val[$i] = itro_get_option( $opt_name[$i] );
|
107 |
-
$px_opt_val[$i] = itro_get_option( 'px_' . $opt_name[$i] );
|
108 |
-
$perc_opt_val[$i] = itro_get_option( 'perc_' . $opt_name[$i] );
|
109 |
-
}
|
110 |
-
}
|
111 |
-
|
112 |
-
/* unsorted option and field */
|
113 |
-
if( isset($_POST[ $submitted_form ]) && $_POST[ $submitted_form ] == 'Y')
|
114 |
-
{
|
115 |
-
//wp token check
|
116 |
-
check_admin_referer('ipp_save_data','ipp_sec_nonce_fld');
|
117 |
-
|
118 |
-
//WP Editor content
|
119 |
-
if(isset($_POST['custom_html'])){
|
120 |
-
$field_value = ipp_validate_data('custom_html', $_POST['custom_html']);
|
121 |
-
}else{
|
122 |
-
$field_value = NULL;
|
123 |
-
}
|
124 |
-
|
125 |
-
/* Save the posted value in the database */
|
126 |
-
itro_update_field( 'custom_html', $field_value );
|
127 |
-
|
128 |
-
|
129 |
-
if( isset($_POST['selected_page_id']) )
|
130 |
-
{
|
131 |
-
$selected_page_id=json_encode($_POST['selected_page_id']);
|
132 |
-
itro_update_option('selected_page_id',$selected_page_id);
|
133 |
-
}
|
134 |
-
else
|
135 |
-
{
|
136 |
-
itro_update_option('selected_page_id',NULL);
|
137 |
-
}
|
138 |
-
|
139 |
-
if( !empty($_POST['background_source']) ){
|
140 |
-
itro_update_option('background_source',$_POST['background_source']);
|
141 |
-
}
|
142 |
|
143 |
-
|
144 |
-
|
145 |
-
|
|
|
|
|
146 |
}
|
147 |
-
|
148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
}
|
150 |
-
}else{
|
151 |
-
|
152 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
}
|
154 |
|
155 |
/* delete tables on plugin uninstall option */
|
156 |
-
if(
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
else
|
165 |
-
{
|
166 |
-
itro_update_option('delete_data', NULL);
|
167 |
-
}
|
168 |
}
|
169 |
|
170 |
/* Put an settings updated message on the screen */
|
171 |
-
if(
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
}
|
176 |
?>
|
177 |
-
<script type="text/javascript" src="<?php echo itroPath . 'scripts/'; ?>jscolor/jscolor.js"></script>
|
178 |
-
|
179 |
-
<div style="display:table; width:100%;">
|
180 |
-
|
181 |
-
|
182 |
-
</div>
|
183 |
-
|
184 |
-
<form id="optionForm" method="post">
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
<
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
<?php
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
599 |
?>
|
3 |
This file is part of ITRO Popup Plugin. (email : support@itroteam.com)
|
4 |
*/
|
5 |
|
6 |
+
if (!defined('ABSPATH')) {
|
7 |
+
exit;
|
8 |
+
} // Exit if accessed directly
|
9 |
|
10 |
global $ITRO_VER;
|
11 |
|
13 |
global $wp_roles;
|
14 |
$userRoles = $currentUser->roles;
|
15 |
$allowedRoles = itro_get_option('roles');
|
16 |
+
if (!itro_can_manage()) {
|
17 |
+
wp_die(__('You do not have sufficient permissions to access this page.'));
|
18 |
}
|
19 |
|
20 |
/* force table installation */
|
21 |
+
if (isset($_POST['force_tables_installation'])) {
|
|
|
22 |
// wp token check
|
23 |
+
check_admin_referer('ipp_save_data', 'ipp_cleardb_nonce_fld');
|
24 |
itro_db_init();
|
25 |
}
|
26 |
|
27 |
/* variables for the field and option names */
|
28 |
+
if (!isset($submitted_form)) {
|
29 |
+
$opt_name = array(
|
30 |
+
/*opt 0*/
|
31 |
+
'popup_time',
|
32 |
+
/*opt 1*/
|
33 |
+
'popup_top_margin',
|
34 |
+
/*opt 2*/
|
35 |
+
'cookie_time_exp',
|
36 |
+
/*opt 3*/
|
37 |
+
'popup_width',
|
38 |
+
/*opt 4*/
|
39 |
+
'popup_background',
|
40 |
+
/*opt 5*/
|
41 |
+
'popup_border_color',
|
42 |
+
/*opt 6*/
|
43 |
+
'age_restriction',
|
44 |
+
/*opt 7*/
|
45 |
+
'enter_button_text',
|
46 |
+
/*opt 8*/
|
47 |
+
'leave_button_text',
|
48 |
+
/*opt 9*/
|
49 |
+
'leave_button_url',
|
50 |
+
/*opt 10*/
|
51 |
+
'enter_button_bg_color',
|
52 |
+
/*opt 11*/
|
53 |
+
'enter_button_border_color',
|
54 |
+
/*opt 12*/
|
55 |
+
'leave_button_bg_color',
|
56 |
+
/*opt 13*/
|
57 |
+
'leave_button_border_color',
|
58 |
+
/*opt 14*/
|
59 |
+
'enter_button_font_color',
|
60 |
+
/*opt 15*/
|
61 |
+
'leave_button_font_color',
|
62 |
+
/*opt 16*/
|
63 |
+
'popup_position',
|
64 |
+
/*opt 17*/
|
65 |
+
'popup_height',
|
66 |
+
/*opt 18*/
|
67 |
+
'page_selection',
|
68 |
+
/*opt 19*/
|
69 |
+
'blog_home',
|
70 |
+
/*opt 20*/
|
71 |
+
'popup_border_radius',
|
72 |
+
/*opt 21*/
|
73 |
+
'count_font_color',
|
74 |
+
/*opt 22*/
|
75 |
+
'background_select',
|
76 |
+
/*opt 23*/
|
77 |
+
'popup_delay',
|
78 |
+
/*opt 24*/
|
79 |
+
'popup_unlockable',
|
80 |
+
/*opt 25*/
|
81 |
+
'popup_bg_opacity',
|
82 |
+
/*opt 26*/
|
83 |
+
'opaco_bg_color',
|
84 |
+
/*opt 27*/
|
85 |
+
'popup_border_width',
|
86 |
+
/*opt 28*/
|
87 |
+
'advanced_settings',
|
88 |
+
/*opt 29*/
|
89 |
+
'show_countdown',
|
90 |
+
/*opt 30*/
|
91 |
+
'auto_margin_check',
|
92 |
+
/*opt 31*/
|
93 |
+
'popup_padding',
|
94 |
+
/*opt 32*/
|
95 |
+
'disable_mobile',
|
96 |
+
/*opt 33*/
|
97 |
+
'cross_selected',
|
98 |
+
/*opt 34*/
|
99 |
+
'enter_button_url',
|
100 |
+
/*opt 35*/
|
101 |
+
'absolute_mobile_pos',
|
102 |
+
/*opt 36*/
|
103 |
+
'countdown_text',
|
104 |
+
/*opt 37*/
|
105 |
+
'close_cross_url',
|
106 |
+
/*opt 38*/
|
107 |
+
'users_display',
|
108 |
+
);
|
109 |
+
|
110 |
+
$submitted_form = 'mt_submit_hidden';
|
111 |
}
|
112 |
|
113 |
/* ordered options */
|
114 |
+
for ($i = 0; $i < count($opt_name); $i++) {
|
115 |
+
/* See if the user has posted us some information */
|
116 |
+
/* If they did, this hidden field will be set to 'Y' */
|
117 |
+
if (isset($_POST[$submitted_form]) && $_POST[$submitted_form] == 'Y') {
|
118 |
+
// wp token check
|
119 |
+
check_admin_referer('ipp_save_data', 'ipp_sec_nonce_fld');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
|
121 |
+
/* Read their posted value */
|
122 |
+
if (isset($_POST[$opt_name[$i]])) {
|
123 |
+
$opt_val[$i] = ipp_validate_data($opt_name[$i], $_POST[$opt_name[$i]]);
|
124 |
+
} else {
|
125 |
+
$opt_val[$i] = NULL;
|
126 |
}
|
127 |
+
|
128 |
+
/* Save the posted value in the database */
|
129 |
+
itro_update_option($opt_name[$i], $opt_val[$i]);
|
130 |
+
|
131 |
+
if (isset($_POST['select_' . $opt_name[$i]])) {
|
132 |
+
itro_update_option('select_' . $opt_name[$i], $_POST['select_' . $opt_name[$i]]);
|
133 |
+
|
134 |
+
$px_opt_val[$i] = ipp_validate_data('px_' . $opt_name[$i], $_POST['px_' . $opt_name[$i]]);
|
135 |
+
itro_update_option('px_' . $opt_name[$i], $_POST['px_' . $opt_name[$i]]);
|
136 |
+
$perc_opt_val[$i] = ipp_validate_data('perc_' . $opt_name[$i], $_POST['perc_' . $opt_name[$i]]);
|
137 |
+
itro_update_option('perc_' . $opt_name[$i], $_POST['perc_' . $opt_name[$i]]);
|
138 |
+
} else {
|
139 |
+
itro_update_option('select_' . $opt_name[$i], NULL);
|
140 |
}
|
141 |
+
} else {
|
142 |
+
/* Read in existing option value from database */
|
143 |
+
$opt_val[$i] = itro_get_option($opt_name[$i]);
|
144 |
+
$px_opt_val[$i] = itro_get_option('px_' . $opt_name[$i]);
|
145 |
+
$perc_opt_val[$i] = itro_get_option('perc_' . $opt_name[$i]);
|
146 |
+
}
|
147 |
+
}
|
148 |
+
|
149 |
+
/* unsorted option and field */
|
150 |
+
if (isset($_POST[$submitted_form]) && $_POST[$submitted_form] == 'Y') {
|
151 |
+
//wp token check
|
152 |
+
check_admin_referer('ipp_save_data', 'ipp_sec_nonce_fld');
|
153 |
+
|
154 |
+
//WP Editor content
|
155 |
+
if (isset($_POST['custom_html'])) {
|
156 |
+
$field_value = ipp_validate_data('custom_html', $_POST['custom_html']);
|
157 |
+
} else {
|
158 |
+
$field_value = NULL;
|
159 |
+
}
|
160 |
+
|
161 |
+
/* Save the posted value in the database */
|
162 |
+
itro_update_field('custom_html', $field_value);
|
163 |
+
|
164 |
+
|
165 |
+
if (isset($_POST['selected_page_id'])) {
|
166 |
+
$selected_page_id = json_encode($_POST['selected_page_id']);
|
167 |
+
itro_update_option('selected_page_id', $selected_page_id);
|
168 |
+
} else {
|
169 |
+
itro_update_option('selected_page_id', NULL);
|
170 |
+
}
|
171 |
+
|
172 |
+
if (!empty($_POST['background_source'])) {
|
173 |
+
itro_update_option('background_source', $_POST['background_source']);
|
174 |
+
}
|
175 |
+
|
176 |
+
if (isset($_POST['roles'])) {
|
177 |
+
$roles_users = json_encode($_POST['roles']);
|
178 |
+
itro_update_option('roles', $roles_users);
|
179 |
+
} else {
|
180 |
+
itro_update_option('roles', NULL);
|
181 |
+
}
|
182 |
+
} else {
|
183 |
+
//WP Editor Content
|
184 |
+
$field_value = stripslashes(itro_get_field('custom_html'));
|
185 |
}
|
186 |
|
187 |
/* delete tables on plugin uninstall option */
|
188 |
+
if (isset($_POST['delete_data_hidden']) && $_POST['delete_data_hidden'] == 'Y') {
|
189 |
+
// wp token check
|
190 |
+
check_admin_referer('ipp_save_data', 'ipp_cleardb_nonce_fld');
|
191 |
+
if (isset($_POST['delete_data'])) {
|
192 |
+
itro_update_option('delete_data', $_POST['delete_data']);
|
193 |
+
} else {
|
194 |
+
itro_update_option('delete_data', NULL);
|
195 |
+
}
|
|
|
|
|
|
|
|
|
196 |
}
|
197 |
|
198 |
/* Put an settings updated message on the screen */
|
199 |
+
if (isset($_POST[$submitted_form]) && $_POST[$submitted_form] == 'Y' || isset($_POST['delete_data_hidden']) && $_POST['delete_data_hidden'] == 'Y') {
|
200 |
+
?>
|
201 |
+
<div class="updated"><p><strong><?php _e('settings saved.', 'itro-plugin'); ?></strong></p></div>
|
202 |
+
<?php
|
203 |
}
|
204 |
?>
|
205 |
+
<script type="text/javascript" src="<?php echo itroPath . 'scripts/'; ?>jscolor/jscolor.js"></script>
|
206 |
+
|
207 |
+
<div style="display:table; width:100%;">
|
208 |
+
<h1 style="float:left;"><?php _e('ITRO Popup Plugin - Settings', 'itro-plugin'); ?></h1>
|
209 |
+
<h4 style="float:right; margin-right:30px;">VER: <?php echo $ITRO_VER; ?></h4>
|
210 |
+
</div>
|
211 |
+
|
212 |
+
<form id="optionForm" method="post">
|
213 |
+
<?php wp_nonce_field('ipp_save_data', 'ipp_sec_nonce_fld'); ?>
|
214 |
+
<div id="leftColumn">
|
215 |
+
<!-- Settings form !-->
|
216 |
+
<div id="formContainer">
|
217 |
+
|
218 |
+
<!--------- General options --------->
|
219 |
+
<?php echo itro_onOff('genOption', 'hidden'); ?>
|
220 |
+
<p class="wpstyle" onClick="onOff_genOption();"><?php _e("General Popup Option:", 'itro-plugin'); ?> </p>
|
221 |
+
<div id="genOption">
|
222 |
+
<input type="hidden" name="<?php echo $submitted_form; ?>" value="Y">
|
223 |
+
|
224 |
+
<!-- advanced settings checkbox !-->
|
225 |
+
<p>
|
226 |
+
<input type="checkbox" id="<?php echo $opt_name[28]; ?>" name="<?php echo $opt_name[28]; ?>" value="yes" <?php if ($opt_val[28] == 'yes') {
|
227 |
+
echo 'checked="checked"';
|
228 |
+
} ?>>
|
229 |
+
<span id="span_<?php echo $opt_name[28]; ?>" onclick="itro_mutual_check('<?php echo $opt_name[28]; ?>','','');"><?php _e("SHOW ADVANCED SETTINGS", "itro-plugin") ?></span>
|
230 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>" title="<?php _e('Display many other options', 'itro-plugin'); ?>"/>
|
231 |
+
</p>
|
232 |
+
|
233 |
+
<!-- roles !-->
|
234 |
+
<p>
|
235 |
+
<h3><?php _e("SELECT THE ROLE", "itro-plugin") ?></h3>
|
236 |
+
<?php
|
237 |
+
$checked = "";
|
238 |
+
$roles_obj = new WP_Roles();
|
239 |
+
foreach ($roles_obj->roles as $role => $role_val) {
|
240 |
+
$allowedRoles = json_decode(itro_get_option('roles'));
|
241 |
+
if (in_array($role, $allowedRoles)) {
|
242 |
+
$checked = "checked";
|
243 |
+
} else {
|
244 |
+
$checked = "";
|
245 |
+
}
|
246 |
+
if ($role == 'administrator' || $role == 'itro_support') {
|
247 |
+
$disabled = 'disabled';
|
248 |
+
$checked = 'checked';
|
249 |
+
} else {
|
250 |
+
$disabled = '';
|
251 |
+
}
|
252 |
+
echo "<input type='checkbox' name='roles[]' id='roles_$role' value='$role' $checked $disabled>";
|
253 |
+
echo '<label for="roles_' . $role . '">' . $role_val['name'] . '</label>';
|
254 |
+
echo "<br><br>";
|
255 |
+
}
|
256 |
+
?>
|
257 |
+
</p>
|
258 |
+
|
259 |
+
<!-- popup display location!-->
|
260 |
+
<p>
|
261 |
+
<h3><?php _e("DECIDE WHERE POPUP WILL BE DISPLAYED", "itro-plugin") ?></h3>
|
262 |
+
<h4>For the users:</h4>
|
263 |
+
<fieldset>
|
264 |
+
<input type="radio" name="<?php echo $opt_name[38]; ?>" id="clickable_a" value="all" <?php if ($opt_val[38] == 'all') {
|
265 |
+
echo 'checked="checked"';
|
266 |
+
} ?>/> <label for="clickable_a"> <?php _e('All users', 'itro-plugin'); ?> </label>
|
267 |
+
<input type="radio" name="<?php echo $opt_name[38]; ?>" id="clickable_b" value="not_logged" <?php if ($opt_val[38] == 'not_logged') {
|
268 |
+
echo 'checked="checked"';
|
269 |
+
} ?>/> <label for="clickable_b"> <?php _e('Not logged in users ', 'itro-plugin'); ?> </label>
|
270 |
+
<input type="radio" name="<?php echo $opt_name[38]; ?>" id="clickable_c" value="logged" <?php if ($opt_val[38] == 'logged' || $opt_name[38] == NULL) {
|
271 |
+
echo 'checked="checked"';
|
272 |
+
} ?>/> <label for="clickable_c"> <?php _e('Logged in users', 'itro-plugin'); ?> </label>
|
273 |
+
</fieldset>
|
274 |
+
<h4>For the page:</h4>
|
275 |
+
<fieldset>
|
276 |
+
<input type="radio" id="only_selected" name="<?php echo $opt_name[18]; ?>" value="some"<?php if ($opt_val[18] == 'some') {
|
277 |
+
echo 'checked="checked"';
|
278 |
+
} ?>/> <label for="only_selected"> <?php _e("Only selected pages", 'itro-plugin'); ?> </label> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>"
|
279 |
+
title="<?php _e("Multiple choices with CTRL+Click or SHIFT+Arrow up or down", 'itro-plugin'); ?>">
|
280 |
+
<input type="radio" id="only_selected_a" name="<?php echo $opt_name[18]; ?>" value="all" <?php if ($opt_val[18] == 'all') {
|
281 |
+
echo 'checked="checked"';
|
282 |
+
} ?>/> <label for="only_selected_a"> <?php _e("All pages", 'itro-plugin'); ?> </label>
|
283 |
+
<input type="radio" id="only_selected_b" name="<?php echo $opt_name[18]; ?>" value="none" <?php if ($opt_val[18] == 'none' || $opt_val[18] == NULL) {
|
284 |
+
echo 'checked="checked"';
|
285 |
+
} ?>/> <label for="only_selected_b"> <?php _e("No page", 'itro-plugin'); ?> </label>
|
286 |
+
</fieldset>
|
287 |
+
<div onClick="document.getElementById('only_selected').checked = true;">
|
288 |
+
<select name="<?php echo $opt_name[19]; ?>" multiple size="1">
|
289 |
+
<option onmouseover="itro_check_state(this)" onmouseup="itro_select(this);" value="yes" <?php if ($opt_val[19] == 'yes') {
|
290 |
+
echo 'selected="select"';
|
291 |
+
} ?> ><?php _e("Blog homepage", "itro-plugin") ?></option>
|
292 |
+
</select>
|
293 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>"
|
294 |
+
title="<?php _e('If in your Settings->Reading you have set \'Front page displays: Your latest posts\' and want to display the popup in the home, check this box.', 'itro-plugin'); ?>"/>
|
295 |
+
<br>
|
296 |
+
<?php
|
297 |
+
/* list of published pages */
|
298 |
+
itro_list_pages();
|
299 |
+
?>
|
300 |
+
</div>
|
301 |
+
</p>
|
302 |
+
|
303 |
+
<!-- disable esc key !-->
|
304 |
+
<h3><?php _e("GENERAL SETTINGS", "itro-plugin") ?></h3>
|
305 |
+
<p id="<?php echo $opt_name[24]; ?>_div">
|
306 |
+
<input type="checkbox" id="<?php echo $opt_name[24]; ?>" name="<?php echo $opt_name[24]; ?>" value="yes" <?php if ($opt_val[24] == 'yes') {
|
307 |
+
echo 'checked="checked"';
|
308 |
+
} ?> />
|
309 |
+
<span onclick="itro_mutual_check('<?php echo $opt_name[24]; ?>','','')"><?php _e("Disable easy closing", 'itro-plugin'); ?></span>
|
310 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>"
|
311 |
+
title="<?php _e('If you set this option, popup can not be closed with ESC button of keyboard or clicking outside the popup.', 'itro-plugin'); ?>">
|
312 |
+
</p>
|
313 |
+
|
314 |
+
<!-- popup seconds!-->
|
315 |
+
<div style="display:table; height:10px; padding-bottom:5px;">
|
316 |
+
<span style="float:left;"><?php _e("Popup seconds:", 'itro-plugin'); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>"
|
317 |
+
title="<?php _e("Set seconds until the popup automatically close. Set it to zero to disable countdown.", 'itro-plugin'); ?>"></span>
|
318 |
+
|
319 |
+
<?php itro_slidebar($opt_name[0], $opt_val[0], 0, 120, 1, 0, '') ?>
|
320 |
+
<input type="text" class="itro_text_input" id="<?php echo $opt_name[0]; ?>" name="<?php echo $opt_name[0]; ?>" value="<?php echo $opt_val[0]; ?>" size="1">
|
321 |
+
</div>
|
322 |
+
|
323 |
+
<!-- popup delay!-->
|
324 |
+
<div id="<?php echo $opt_name[23]; ?>_div" style="display:table; height:10px; padding-bottom:5px;">
|
325 |
+
<span style="float:left;"><?php _e("Popup delay:", 'itro-plugin'); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>"
|
326 |
+
title="<?php _e("Set seconds before the popup will be displayed", 'itro-plugin'); ?>"></span>
|
327 |
+
|
328 |
+
<?php itro_slidebar($opt_name[23], $opt_val[23], 0, 120, 1, 0, '') ?>
|
329 |
+
<input type="text" class="itro_text_input" id="<?php echo $opt_name[23]; ?>" name="<?php echo $opt_name[23]; ?>" value="<?php echo $opt_val[23]; ?>" size="1">
|
330 |
+
</div>
|
331 |
+
|
332 |
+
<!-- next time visualization !-->
|
333 |
+
<div style="display:table; height:10px; padding-bottom:5px;">
|
334 |
+
<span style="float:left;"><?php _e("Next visualization (hours):", 'itro-plugin'); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>"
|
335 |
+
title="<?php _e("Set time for the next visualization of popup, to prevent annoying repeated visualizations, when someone visit pages",
|
336 |
+
'itro-plugin'); ?>"></span>
|
337 |
+
|
338 |
+
<?php itro_slidebar($opt_name[2], $opt_val[2], 0, 720, 6, 0, '') ?>
|
339 |
+
<input type="text" class="itro_text_input" id="<?php echo $opt_name[2]; ?>" name="<?php echo $opt_name[2]; ?>" value="<?php echo $opt_val[2]; ?>" size="1">
|
340 |
+
</div>
|
341 |
+
|
342 |
+
<input value="<?php _e("Delete cookie", 'itro-plugin'); ?>" type="button" class="button"
|
343 |
+
onclick="itro_set_cookie('popup_cookie','one_time_popup',-100); jQuery('#cookie_msg').stop(true, true); jQuery('#cookie_msg').fadeIn(function() {jQuery('#cookie_msg').fadeOut(6000);});">
|
344 |
+
<span id="cookie_msg" style="display:none;background-color:green;"><?php _e("Cookie deleted!", 'itro-plugin'); ?></span>
|
345 |
+
|
346 |
+
<!-- countdown settings !-->
|
347 |
+
<p id="<?php echo $opt_name[29]; ?>_div">
|
348 |
+
<input type="checkbox" name="<?php echo $opt_name[29]; ?>" id="<?php echo $opt_name[29]; ?>" value="yes" <?php if (itro_get_option($opt_name[29]) == 'yes') {
|
349 |
+
echo 'checked="checked"';
|
350 |
+
} ?> />
|
351 |
+
<span onclick="itro_mutual_check('<?php echo $opt_name[29]; ?>','','')"><?php _e("Show countdown", 'itro-plugin'); ?></span>
|
352 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>"
|
353 |
+
title="<?php _e('Show the countdown at the bottom of the popup which dispay the time before popup will close. If is hidden, it run anyway.', 'itro-plugin'); ?>">
|
354 |
+
<br>
|
355 |
+
<?php _e("Countdown text:", 'itro-plugin'); ?>
|
356 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>" title="<?php _e('Countdown text at the bottom border of the popup', 'itro-plugin'); ?>">
|
357 |
+
<input type="text" placeholder="This popup will close in:" name="<?php echo $opt_name[36]; ?>" value="<?php echo $opt_val[36]; ?>" size="40">
|
358 |
+
<br>
|
359 |
+
<?php _e("Countdown font color:", 'itro-plugin'); ?>
|
360 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>" title="<?php _e('Select the countdown font color.', 'itro-plugin'); ?>">
|
361 |
+
<input type="text" class="color" name="<?php echo $opt_name[21]; ?>" value="<?php echo $opt_val[21]; ?>" size="10">
|
362 |
+
</p>
|
363 |
+
|
364 |
+
<h3><?php _e("POPUP ASPECT", "itro-plugin") ?></h3>
|
365 |
+
|
366 |
+
<!-- popup width !-->
|
367 |
+
<div style="display:table; height:10px; padding-bottom:5px;">
|
368 |
+
<span style="float:left;"><?php _e("Popup width:", 'itro-plugin'); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>"
|
369 |
+
title="<?php _e("Use the % to change width dinamically with the browser window , or px for fixed dimension i.e: 30% or 200px",
|
370 |
+
'itro-plugin'); ?>"></span>
|
371 |
+
|
372 |
+
<?php itro_slidebar($opt_name[3], $opt_val[3], 0, 1500, 10, 0, 'px') ?>
|
373 |
+
<?php itro_slidebar($opt_name[3], $opt_val[3], 0, 100, 1, 0, 'perc') ?>
|
374 |
+
<input type="text" class="itro_text_input" style="<?php if (itro_get_option('select_' . $opt_name[3]) != 'px') {
|
375 |
+
echo 'display:none;';
|
376 |
+
} ?>" id="<?php echo 'px_' . $opt_name[3]; ?>" name="<?php echo 'px_' . $opt_name[3]; ?>" value="<?php echo $px_opt_val[3]; ?>" size="1">
|
377 |
+
<input type="text" class="itro_text_input" style="<?php if (itro_get_option('select_' . $opt_name[3]) != 'perc') {
|
378 |
+
echo 'display:none;';
|
379 |
+
} ?>" id="<?php echo 'perc_' . $opt_name[3]; ?>" name="<?php echo 'perc_' . $opt_name[3]; ?>" value="<?php echo $perc_opt_val[3]; ?>" size="1">
|
380 |
+
<select id="select_<?php echo $opt_name[3]; ?>" name="select_<?php echo $opt_name[3]; ?>" style="position:relative; left:7px;">
|
381 |
+
<option value="px" onClick="itro_enable_<?php echo $opt_name[3]; ?>('px')" <?php if (itro_get_option('select_' . $opt_name[3]) == 'px') {
|
382 |
+
echo 'selected="select"';
|
383 |
+
} ?>>px
|
384 |
+
</option>
|
385 |
+
<option value="perc" onClick="itro_enable_<?php echo $opt_name[3]; ?>('perc')" <?php if (itro_get_option('select_' . $opt_name[3]) == 'perc') {
|
386 |
+
echo 'selected="select"';
|
387 |
+
} ?>>%
|
388 |
+
</option>
|
389 |
+
</select>
|
390 |
+
</div>
|
391 |
+
|
392 |
+
<!-- popup height !-->
|
393 |
+
<div id="<?php echo $opt_name[17]; ?>_div" style="display:table; height:10px; padding-bottom:5px;">
|
394 |
+
<span style="float:left;"><?php _e("Popup height:", 'itro-plugin'); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>"
|
395 |
+
title="<?php _e("Select auto to adapt popup height to the content", 'itro-plugin'); ?>"></span>
|
396 |
+
|
397 |
+
<?php itro_slidebar($opt_name[17], $opt_val[17], 0, 750, 5, 0, 'px') ?>
|
398 |
+
<?php itro_slidebar($opt_name[17], $opt_val[17], 0, 100, 1, 0, 'perc') ?>
|
399 |
+
<input type="text" class="itro_text_input" style="<?php if (itro_get_option('select_' . $opt_name[17]) != 'px') {
|
400 |
+
echo 'display:none;';
|
401 |
+
} ?>" id="<?php echo 'px_' . $opt_name[17]; ?>" name="<?php echo 'px_' . $opt_name[17]; ?>" value="<?php echo $px_opt_val[17]; ?>" size="1">
|
402 |
+
<input type="text" class="itro_text_input" style="<?php if (itro_get_option('select_' . $opt_name[17]) != 'perc') {
|
403 |
+
echo 'display:none;';
|
404 |
+
} ?>" id="<?php echo 'perc_' . $opt_name[17]; ?>" name="<?php echo 'perc_' . $opt_name[17]; ?>" value="<?php echo $perc_opt_val[17]; ?>" size="1">
|
405 |
+
<select id="select_<?php echo $opt_name[17]; ?>" name="select_<?php echo $opt_name[17]; ?>" style="position:relative; left:7px;">
|
406 |
+
<option value="px" onClick="itro_enable_<?php echo $opt_name[17]; ?>('px')" <?php if (itro_get_option('select_' . $opt_name[17]) == 'px') {
|
407 |
+
echo 'selected="select"';
|
408 |
+
} ?>>px
|
409 |
+
</option>
|
410 |
+
<option value="perc" onClick="itro_enable_<?php echo $opt_name[17]; ?>('perc')" <?php if (itro_get_option('select_' . $opt_name[17]) == 'perc') {
|
411 |
+
echo 'selected="select"';
|
412 |
+
} ?>>%
|
413 |
+
</option>
|
414 |
+
<option value="auto" onClick="itro_disable_<?php echo $opt_name[17]; ?>();" <?php if (itro_get_option('select_' . $opt_name[17]) == 'auto') {
|
415 |
+
echo 'selected="select"';
|
416 |
+
} ?>>auto
|
417 |
+
</option>
|
418 |
+
</select>
|
419 |
+
</div>
|
420 |
+
|
421 |
+
<!-- background and border color !-->
|
422 |
+
<p><?php _e("Popup background color", 'itro-plugin'); ?>
|
423 |
+
<input type="text" class="color" name="<?php echo $opt_name[4]; ?>" value="<?php echo $opt_val[4]; ?>" size="10">
|
424 |
+
<?php _e("Popup border color:", 'itro-plugin'); ?>
|
425 |
+
<input type="text" class="color" name="<?php echo $opt_name[5]; ?>" value="<?php echo $opt_val[5]; ?>" size="10">
|
426 |
+
</p>
|
427 |
+
|
428 |
+
<!-- border radius !-->
|
429 |
+
<div id="<?php echo $opt_name[20]; ?>_div" style="display:table; height:10px; padding-bottom:5px;">
|
430 |
+
<span style="float:left;"><?php _e("Popup border radius(px):", 'itro-plugin'); ?></span>
|
431 |
+
|
432 |
+
<?php itro_slidebar($opt_name[20], $opt_val[20], 0, 200, 1, 0, '') ?>
|
433 |
+
<input type="text" class="itro_text_input" id="<?php echo $opt_name[20]; ?>" name="<?php echo $opt_name[20]; ?>" value="<?php echo $opt_val[20]; ?>" size="1">
|
434 |
+
</div>
|
435 |
+
|
436 |
+
<!-- border width !-->
|
437 |
+
<div id="<?php echo $opt_name[27]; ?>_div" style="display:table; height:10px; padding-bottom:5px;">
|
438 |
+
<span style="float:left;"><?php _e("Popup border width(px):", 'itro-plugin'); ?></span>
|
439 |
+
|
440 |
+
<?php itro_slidebar($opt_name[27], $opt_val[27], 0, 50, 1, 0, '') ?>
|
441 |
+
<input type="text" class="itro_text_input" id="<?php echo $opt_name[27]; ?>" name="<?php echo $opt_name[27]; ?>" value="<?php echo $opt_val[27]; ?>" size="1">
|
442 |
+
</div>
|
443 |
+
|
444 |
+
<!-- popup padding !-->
|
445 |
+
<div id="<?php echo $opt_name[31]; ?>_div" style="display:table; height:10px; padding-bottom:5px;">
|
446 |
+
<span style="float:left;"><?php _e("Popup padding(px):", 'itro-plugin'); ?></span>
|
447 |
+
|
448 |
+
<?php itro_slidebar($opt_name[31], $opt_val[31], 0, 100, 1, 0, '') ?>
|
449 |
+
<input type="text" class="itro_text_input" id="<?php echo $opt_name[31]; ?>" name="<?php echo $opt_name[31]; ?>" value="<?php echo $opt_val[31]; ?>" size="1">
|
450 |
+
</div>
|
451 |
+
|
452 |
+
<!-- popup position !-->
|
453 |
+
<p><?php _e("Popup position:", 'itro-plugin'); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>"
|
454 |
+
title="<?php _e("Setting ABSOLUTE the popup will be static on the page. Setting FIXED it will scroll with the page.", 'itro-plugin'); ?>">
|
455 |
+
<select name="<?php echo $opt_name[16]; ?>" style="min-width:100px;">
|
456 |
+
<option value="absolute" <?php if (itro_get_option($opt_name[16]) == 'absolute') {
|
457 |
+
echo 'selected="select"';
|
458 |
+
} ?> >Absolute
|
459 |
+
</option>
|
460 |
+
<option value="fixed" <?php if (itro_get_option($opt_name[16]) == 'fixed') {
|
461 |
+
echo 'selected="select"';
|
462 |
+
} ?> >Fixed
|
463 |
+
</option>
|
464 |
+
</select>
|
465 |
+
</p>
|
466 |
+
|
467 |
+
<h4><?php _e("TOP MARGIN", 'itro-plugin'); ?></h4>
|
468 |
+
<p>
|
469 |
+
<input id="<?php echo $opt_name[30]; ?>" type="checkbox" name="<?php echo $opt_name[30]; ?>" value="yes" <?php if (itro_get_option($opt_name[30]) == 'yes') {
|
470 |
+
echo 'checked="checked"';
|
471 |
+
} ?> />
|
472 |
+
<span id="span_<?php echo $opt_name[30]; ?>" onclick="itro_mutual_check('<?php echo $opt_name[30]; ?>','','');"><?php _e("Automatic top margin:", 'itro-plugin'); ?></span>
|
473 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>"
|
474 |
+
title="<?php _e("The system will try to center the popup automatically, unselect it if you encounter any issues", 'itro-plugin'); ?>">
|
475 |
+
</p>
|
476 |
+
|
477 |
+
<!-- popup top margin !-->
|
478 |
+
<div id="top_margin_slider" style=" <?php if (itro_get_option($opt_name[30]) == 'yes') {
|
479 |
+
echo 'display:none';
|
480 |
+
} else {
|
481 |
+
echo 'display:table';
|
482 |
+
} ?>; height:10px; padding-bottom:5px;">
|
483 |
+
<span style="float:left;"><?php _e("Popup top margin(px):", 'itro-plugin'); ?></span>
|
484 |
+
|
485 |
+
<?php itro_slidebar($opt_name[1], $opt_val[1], 0, 750, 5, 0, '') ?>
|
486 |
+
<input type="text" class="itro_text_input" id="<?php echo $opt_name[1]; ?>" name="<?php echo $opt_name[1]; ?>" value="<?php echo $opt_val[1]; ?>" size="1">
|
487 |
+
</div>
|
488 |
+
<?php echo itro_show_hide(array('top_margin_slider'), $opt_name[30], 'table', FALSE, array('yellow', 300)); ?>
|
489 |
+
|
490 |
+
<h4><?php _e("BACKGROUND IMAGE", 'itro-plugin'); ?></h4>
|
491 |
+
<a href="<?php if (itro_get_option('background_source') == NULL) {
|
492 |
+
echo 'javascript:void(0)';
|
493 |
+
} else {
|
494 |
+
echo itro_get_option('background_source');
|
495 |
+
} ?>"><?php _e('Show image', 'itro-plugin') ?></a>
|
496 |
+
|
497 |
+
<input type="radio" name="<?php echo $opt_name[22]; ?>" value="" <?php if ($opt_val[22] == 'no' || $opt_val[22] == NULL) {
|
498 |
+
echo 'checked="checked"';
|
499 |
+
} ?>/>
|
500 |
+
<?php _e("No background", 'itro-plugin'); ?><br>
|
501 |
+
<input type="radio" id="yes_bg" name="<?php echo $opt_name[22]; ?>" value="yes" <?php if ($opt_val[22] == 'yes') {
|
502 |
+
echo 'checked="checked"';
|
503 |
+
} ?>/>
|
504 |
+
<input class="upload" onClick="select(); document.getElementById('yes_bg').checked=true" type="text" name="background_source" size="50" value="<?php echo itro_get_option('background_source'); ?>"/>
|
505 |
+
<input class="button ipp_upload_button" type="button" name="bg_upload_button" value="<?php _e('Upload Image', 'itro-plugin') ?>"/>
|
506 |
+
|
507 |
+
|
508 |
+
<div id="<?php echo $opt_name[30]; ?>_div">
|
509 |
+
<h4><?php _e("OPAQUE LAYER", 'itro-plugin'); ?></h4>
|
510 |
+
<!-- background opacity !-->
|
511 |
+
<div style="display:table; height:10px; padding-bottom:5px;">
|
512 |
+
<span style="float:left;"><?php _e("Layer opacity", 'itro-plugin'); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>"
|
513 |
+
title="<?php _e("Set the opacity of opaque layer under the popup.", 'itro-plugin'); ?>"></span>
|
514 |
+
|
515 |
+
<?php itro_slidebar($opt_name[25], $opt_val[25], 0, 1, 0.05, 2, '') ?>
|
516 |
+
<input type="text" class="itro_text_input" id="<?php echo $opt_name[25]; ?>" name="<?php echo $opt_name[25]; ?>" value="<?php echo $opt_val[25]; ?>" size="1">
|
517 |
+
</div>
|
518 |
+
<script type="text/javascript">
|
519 |
+
document.getElementById("<?php echo $opt_name[25]; ?>_slider_container").addEventListener("mousedown", update, false);
|
520 |
+
document.getElementById("<?php echo $opt_name[25]; ?>_slider_container").addEventListener("mouseup", update, false);
|
521 |
+
document.getElementById("<?php echo $opt_name[25]; ?>_slider_container").addEventListener("keydown", update, false);
|
522 |
+
|
523 |
+
function update()
|
524 |
+
{
|
525 |
+
document.getElementById("<?php echo $opt_name[26]; ?>").style.opacity = document.getElementById("<?php echo $opt_name[25]; ?>").value;
|
526 |
+
document.addEventListener("mousemove", update, false);
|
527 |
+
}
|
528 |
+
|
529 |
+
function stop()
|
530 |
+
{
|
531 |
+
document.removeEventListener("mousemove", update, false);
|
532 |
+
}
|
533 |
+
</script
|
534 |
+
|
535 |
+
<!-- opaco color !-->
|
536 |
+
<p><?php _e("Layer color", 'itro-plugin'); ?>
|
537 |
+
<input type="text" class="color" id="<?php echo $opt_name[26]; ?>" name="<?php echo $opt_name[26]; ?>" style="opacity:<?php echo $opt_val[25]; ?> ;" value="<?php echo $opt_val[26]; ?>" size="10">
|
538 |
+
</p>
|
539 |
+
|
540 |
+
<h4><?php _e("CLOSE CROSS", 'itro-plugin'); ?></h4>
|
541 |
+
<!-- close cross selection !-->
|
542 |
+
<p><?php _e("Select image", 'itro-plugin'); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>"
|
543 |
+
title="<?php _e("Select the colour combination of the closing cross on the upper right of popup.", 'itro-plugin'); ?>">
|
544 |
+
<select name="<?php echo $opt_name[33]; ?>" style="min-width:100px;">
|
545 |
+
<option value="black" <?php if (itro_get_option($opt_name[33]) == 'black') {
|
546 |
+
echo 'selected="select"';
|
547 |
+
} ?> ><?php _e("Black", 'itro-plugin'); ?></option>
|
548 |
+
<option value="white" <?php if (itro_get_option($opt_name[33]) == 'white') {
|
549 |
+
echo 'selected="select"';
|
550 |
+
} ?> ><?php _e("White", 'itro-plugin'); ?></option>
|
551 |
+
<option value="white_border" <?php if (itro_get_option($opt_name[33]) == 'white_border') {
|
552 |
+
echo 'selected="select"';
|
553 |
+
} ?> ><?php _e("White with border", 'itro-plugin'); ?></option>
|
554 |
+
<option value="url" <?php if (itro_get_option($opt_name[33]) == 'url') {
|
555 |
+
echo 'selected="select"';
|
556 |
+
} ?> ><?php _e("Custom URL", 'itro-plugin'); ?></option>
|
557 |
+
</select>
|
558 |
+
<!-- custom cross image url !-->
|
559 |
+
<p>
|
560 |
+
<?php _e("Image custom URL", 'itro-plugin'); ?>
|
561 |
+
<a href="<?php if ($opt_val[37] == NULL) {
|
562 |
+
echo 'javascript:void(0)';
|
563 |
+
} else {
|
564 |
+
echo $opt_val[37];
|
565 |
+
} ?>"><?php _e('Show image', 'itro-plugin') ?></a>
|
566 |
+
<input class="upload" onClick="select();" type="text" name="<?php echo $opt_name[37]; ?>" size="50" value="<?php echo $opt_val[37]; ?>"/>
|
567 |
+
<input class="button ipp_upload_button" type="button" name="close_img_upload" value="<?php _e('Upload Image', 'itro-plugin') ?>"/>
|
568 |
+
</p>
|
569 |
+
<?php echo __("TIP: tag ID for css customization: #close_cross", 'itro-plugin') . "<br>" . __("If you cannot see difference, try to use the '!important' css directive.", 'itro-plugin'); ?>
|
570 |
+
</p>
|
571 |
+
|
572 |
+
<!-- RESPONSIVE SETTINGS -->
|
573 |
+
<h3><?php _e("RESPONSIVE SETTINGS", "itro-plugin") ?></h3>
|
574 |
+
<p>
|
575 |
+
<!-- disable on mobile -->
|
576 |
+
<input type="checkbox" id="<?php echo $opt_name[32]; ?>" name="<?php echo $opt_name[32]; ?>" value="yes" <?php if ($opt_val[32] == 'yes') {
|
577 |
+
echo 'checked="checked"';
|
578 |
+
} ?> />
|
579 |
+
<span onclick="itro_mutual_check('<?php echo $opt_name[32]; ?>','','')"><?php _e("Disable on mobile device", 'itro-plugin'); ?></span>
|
580 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>" title="<?php _e('Check this to disable popup on mobile devices', 'itro-plugin'); ?>">
|
581 |
+
|
582 |
+
<!-- absolute position for mobile -->
|
583 |
+
<input type="checkbox" id="<?php echo $opt_name[35]; ?>" name="<?php echo $opt_name[35]; ?>" value="yes" <?php if ($opt_val[35] == 'yes') {
|
584 |
+
echo 'checked="checked"';
|
585 |
+
} ?> />
|
586 |
+
<span onclick="itro_mutual_check('<?php echo $opt_name[35]; ?>','','')"><?php _e("Absolute position for mobile", 'itro-plugin'); ?></span>
|
587 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>"
|
588 |
+
title="<?php _e('Set an absolute position for the pop-up. It is useful for mobile devices if your popup is too high', 'itro-plugin'); ?>">
|
589 |
+
|
590 |
+
</p>
|
591 |
+
</div>
|
592 |
+
|
593 |
+
</div>
|
594 |
+
|
595 |
+
<!------------ Age restriction option ---------->
|
596 |
+
<?php echo itro_onOff('ageRestSettings', 'hidden'); ?>
|
597 |
+
<p class="wpstyle" onClick="onOff_ageRestSettings();"><?php _e("Age restriction settings:", 'itro-plugin'); ?> </p>
|
598 |
+
<div id="ageRestSettings">
|
599 |
+
<p>
|
600 |
+
<input id="<?php echo $opt_name[6]; ?>" type="checkbox" name="<?php echo $opt_name[6]; ?>" value="yes" <?php if ($opt_val[6] == 'yes') {
|
601 |
+
echo 'checked="checked"';
|
602 |
+
} ?> />
|
603 |
+
<span id="span_<?php echo $opt_name[6]; ?>" onclick="itro_mutual_check('<?php echo $opt_name[6]; ?>','','');"><?php _e("Enable age validation", 'itro-plugin'); ?></span>
|
604 |
+
</p>
|
605 |
+
<div id="<?php echo $opt_name[6]; ?>_div">
|
606 |
+
<p><?php _e("Enter button text:", 'itro-plugin'); ?>
|
607 |
+
<input type="text" name="<?php echo $opt_name[7]; ?>" value="<?php echo $opt_val[7]; ?>" placeholder="<?php _e("i.e.: I AM OVER 18 - ENTER", 'itro-plugin'); ?>" size="40">
|
608 |
+
</p>
|
609 |
+
<p><?php _e("Enter button url:", 'itro-plugin'); ?>
|
610 |
+
<input type="text" name="<?php echo $opt_name[34]; ?>" value="<?php echo $opt_val[34]; ?>" placeholder="<?php _e("i.e.: http://www.mysite.com/enter.html", 'itro-plugin'); ?>" size="40">
|
611 |
+
</p>
|
612 |
+
|
613 |
+
<div id="<?php echo $opt_name[6] . '_advanced_1'; ?>">
|
614 |
+
<p><?php _e("Enter button background color:", 'itro-plugin'); ?>
|
615 |
+
<input type="text" class="color" name="<?php echo $opt_name[10]; ?>" value="<?php echo $opt_val[10]; ?>" size="10">
|
616 |
+
</p>
|
617 |
+
<p><?php _e("Enter button border color:", 'itro-plugin'); ?>
|
618 |
+
<input type="text" class="color" name="<?php echo $opt_name[11]; ?>" value="<?php echo $opt_val[11]; ?>" size="10">
|
619 |
+
</p>
|
620 |
+
<p><?php _e("Enter button font color:", 'itro-plugin'); ?>
|
621 |
+
<input type="text" class="color" name="<?php echo $opt_name[14]; ?>" value="<?php echo $opt_val[14]; ?>" size="10">
|
622 |
+
</p>
|
623 |
+
</div>
|
624 |
+
|
625 |
+
<p><?php _e("Leave button text:", 'itro-plugin'); ?>
|
626 |
+
<input type="text" name="<?php echo $opt_name[8]; ?>" value="<?php echo $opt_val[8] ?>" placeholder="<?php _e("i.e.: I AM UNDER 18 - LEAVE", 'itro-plugin'); ?>" size="40">
|
627 |
+
</p>
|
628 |
+
<p><?php _e("Leave button url:", 'itro-plugin'); ?>
|
629 |
+
<input type="text" name="<?php echo $opt_name[9]; ?>" value="<?php echo $opt_val[9]; ?>" placeholder="<?php _e("i.e.: http://www.mysite.com/leave.html", 'itro-plugin'); ?>" size="40">
|
630 |
+
</p>
|
631 |
+
|
632 |
+
<div id="<?php echo $opt_name[6] . '_advanced_2'; ?>">
|
633 |
+
<p><?php _e("Leave button background color:", 'itro-plugin'); ?>
|
634 |
+
<input type="text" class="color" name="<?php echo $opt_name[12]; ?>" value="<?php echo $opt_val[12]; ?>" size="10">
|
635 |
+
</p>
|
636 |
+
<p><?php _e("Leave button border color:", 'itro-plugin'); ?>
|
637 |
+
<input type="text" class="color" name="<?php echo $opt_name[13]; ?>" value="<?php echo $opt_val[13]; ?>" size="10">
|
638 |
+
</p>
|
639 |
+
<p><?php _e("Leave button font color:", 'itro-plugin'); ?>
|
640 |
+
<input type="text" class="color" name="<?php echo $opt_name[15]; ?>" value="<?php echo $opt_val[15]; ?>" size="10">
|
641 |
+
</p>
|
642 |
+
</div>
|
643 |
+
|
644 |
+
</div>
|
645 |
+
</div>
|
646 |
+
<?php echo itro_show_hide(array($opt_name[6] . '_div'), $opt_name[6], 'table', TRUE, array('yellow', 300)); ?>
|
647 |
+
</div>
|
648 |
+
<hr>
|
649 |
+
<p class="submit">
|
650 |
+
<input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>"/>
|
651 |
+
<input type="button" target="_blank" class="button" onClick="window.open('<?php echo get_site_url() . '/?itro_preview=yes' ?>')" value="<?php echo _e('Preview page', 'itro-plugin') ?>">
|
652 |
+
</p>
|
653 |
+
</div>
|
654 |
+
|
655 |
+
<div id="rightColumn">
|
656 |
+
<!-- A simple not annoying banner, please do not remove, we use it to quickly comunicate with you about premium and free! !-->
|
657 |
+
<p class="wpstyle" onClick="jQuery('#premium_ads').toggle('blind');"><?php _e('ITRO Popup messages', 'itro-plugin'); ?> </p>
|
658 |
+
<div id="premium_ads" style="text-align: center;">
|
659 |
+
<a target="_blank" href="http://www.itroteam.com"><img title="TRY IT FOR FREE!!!" src="https://www.itroteam.com/plugins/premium_banner.png"></a>
|
660 |
+
</div>
|
661 |
+
|
662 |
+
<input type="hidden" name="<?php echo $submitted_form; ?>" value="Y">
|
663 |
+
<!------- Custom html field -------->
|
664 |
+
<p class="wpstyle" onClick="jQuery('#customHtmlForm').toggle();"><?php _e("Your text (or HTML code):", 'itro-plugin'); ?> </p>
|
665 |
+
<div id="customHtmlForm">
|
666 |
+
<?php
|
667 |
+
$content = stripslashes($field_value);
|
668 |
+
wp_editor($content, 'custom_html', array('textarea_name' => 'custom_html', 'teeny' => FALSE, 'media_buttons' => TRUE, 'wpautop' => FALSE)); ?>
|
669 |
+
<br><br>
|
670 |
+
<hr>
|
671 |
+
<p class="submit">
|
672 |
+
<input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>"/>
|
673 |
+
<input type="button" target="_blank" class="button" onClick="window.open('<?php echo get_site_url() . '/?itro_preview=yes' ?>')" value="<?php echo _e('Preview page', 'itro-plugin') ?>">
|
674 |
+
</p>
|
675 |
+
</div>
|
676 |
+
</div>
|
677 |
+
</form>
|
678 |
+
<div id="rightColumn2">
|
679 |
+
<div id="donateForm">
|
680 |
+
<h3><?php _e("Like it? Leave us a 5 stars review! ;-)", "itro-plugin") ?> <a href="https://wordpress.org/support/view/plugin-reviews/itro-popup?filter=5" target="_blank"><img id="stars_review_img"
|
681 |
+
src="<?php echo itroImages . '5_stars.png'; ?>"></a>
|
682 |
+
</h3>
|
683 |
+
<p>
|
684 |
+
<?php _e("Our plugin is totally free, without annoying ads. Supporting us with a good review is very important for our work. Thank you!", "itro-plugin"); ?>
|
685 |
+
</p>
|
686 |
+
</div>
|
687 |
+
<p class="wpstyle" onClick="jQuery('#debug_info').toggle();"><?php _e("System Status", 'itro-plugin'); ?> </p>
|
688 |
+
<div method="POST" action="" id="debug_info" style="display:none;">
|
689 |
+
<?php echo itro_get_serverinfo(); ?>
|
690 |
+
<form method="post" style="clear:both;">
|
691 |
+
<?php wp_nonce_field('ipp_save_data', 'ipp_cleardb_nonce_fld'); ?>
|
692 |
+
<br>
|
693 |
+
<hr>
|
694 |
+
<input type="hidden" name="force_tables_installation" value="Y">
|
695 |
+
<span><?php _e("FORCE TABLE INSTALLATION", 'itro-plugin'); ?></span>
|
696 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>"
|
697 |
+
title="<?php _e('If in the System Status you see "Plugin DB Status - Installed tables: no tables" click this button to force the installation of our plugin tables', 'itro-plugin'); ?>">
|
698 |
+
|
699 |
+
<input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('FORCE') ?>"/>
|
700 |
+
</form>
|
701 |
+
</div>
|
702 |
+
</div>
|
703 |
+
|
704 |
+
<form id="delete_data" method="post" style="clear:both;">
|
705 |
+
<?php wp_nonce_field('ipp_save_data', 'ipp_cleardb_nonce_fld'); ?>
|
706 |
+
<br>
|
707 |
+
<hr>
|
708 |
+
<input type="hidden" name="delete_data_hidden" value="Y">
|
709 |
+
<input type="checkbox" id="delete_data" name="delete_data" value="yes" <?php if (itro_get_option('delete_data') == 'yes') {
|
710 |
+
echo 'checked="checked"';
|
711 |
+
} ?> />
|
712 |
+
<span><?php _e("DELETE ALL DATA ON PLUGIN UNINSTALL", 'itro-plugin'); ?></span>
|
713 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png'; ?>"
|
714 |
+
title="<?php _e('Check this box if you want to delete or maintain database tables. It is usefull if you have to try to install again the plugin, without lost your settings.', 'itro-plugin'); ?>">
|
715 |
+
|
716 |
+
<input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>"/>
|
717 |
+
</form>
|
718 |
+
|
719 |
+
|
720 |
+
<?php
|
721 |
+
$itro_hide_args = array(
|
722 |
+
$opt_name[24] . '_div',
|
723 |
+
$opt_name[29] . '_div',
|
724 |
+
$opt_name[17] . '_div',
|
725 |
+
$opt_name[20] . '_div',
|
726 |
+
$opt_name[27] . '_div',
|
727 |
+
$opt_name[30] . '_div',
|
728 |
+
$opt_name[31] . '_div',
|
729 |
+
$opt_name[23] . '_div',
|
730 |
+
$opt_name[6] . '_advanced_1',
|
731 |
+
$opt_name[6] . '_advanced_2',
|
732 |
+
);
|
733 |
+
echo itro_show_hide($itro_hide_args, $opt_name[28], 'table', TRUE, array('yellow', 10000));
|
734 |
?>
|
functions/core-function.php
CHANGED
@@ -9,8 +9,39 @@ if (!defined('ABSPATH'))
|
|
9 |
/* ------------------ADD MENU PAGE */
|
10 |
|
11 |
function itro_plugin_menu() {
|
12 |
-
|
|
|
|
|
|
|
13 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
/* -------------- INITIALIZATION */
|
16 |
|
9 |
/* ------------------ADD MENU PAGE */
|
10 |
|
11 |
function itro_plugin_menu() {
|
12 |
+
if(!itro_can_manage()){
|
13 |
+
return;
|
14 |
+
}
|
15 |
+
add_options_page('Popup Plugin Options', 'ITRO Popup', 'read', itroRootPath . 'admin/popup-admin.php', '');
|
16 |
}
|
17 |
+
function itro_can_manage() {
|
18 |
+
$current_user = wp_get_current_user();
|
19 |
+
|
20 |
+
if (current_user_can('manage_options')) {
|
21 |
+
return true;
|
22 |
+
}
|
23 |
+
|
24 |
+
$selected_roles = json_decode(itro_get_option('roles'));
|
25 |
+
|
26 |
+
if (is_array($selected_roles)) {
|
27 |
+
foreach ($selected_roles as $sing_role) {
|
28 |
+
foreach ($current_user->roles as $curr_role) {
|
29 |
+
if ($sing_role == $curr_role || $curr_role == 'itro_support') {
|
30 |
+
return true;
|
31 |
+
}
|
32 |
+
}
|
33 |
+
}
|
34 |
+
return false;
|
35 |
+
} else {
|
36 |
+
foreach ($current_user->roles as $curr_role) {
|
37 |
+
if ($curr_role == 'itro_support') {
|
38 |
+
return true;
|
39 |
+
}
|
40 |
+
}
|
41 |
+
return false;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
|
46 |
/* -------------- INITIALIZATION */
|
47 |
|
mc-main.php
CHANGED
@@ -6,14 +6,14 @@ Description: EN - Show a perfecly centered customizable popup and a popup-system
|
|
6 |
Author: ITRO Team
|
7 |
E-mail: support@itroteam.com
|
8 |
Text Domain: itro-popup
|
9 |
-
Version: 5.2
|
10 |
Author URI: https://www.itroteam.com
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
14 |
|
15 |
global $ITRO_VER;
|
16 |
-
$ITRO_VER = '5.2';
|
17 |
|
18 |
global $popup_fired; //it check if there is a popup visualization via shortcode or via automatic visualization
|
19 |
$popup_fired = false;
|
6 |
Author: ITRO Team
|
7 |
E-mail: support@itroteam.com
|
8 |
Text Domain: itro-popup
|
9 |
+
Version: 5.2.1
|
10 |
Author URI: https://www.itroteam.com
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
14 |
|
15 |
global $ITRO_VER;
|
16 |
+
$ITRO_VER = '5.2.1';
|
17 |
|
18 |
global $popup_fired; //it check if there is a popup visualization via shortcode or via automatic visualization
|
19 |
$popup_fired = false;
|
readme.txt
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
=== ITRO Popup Plugin ===
|
2 |
-
Contributors: ITRO,
|
3 |
Donate link: https://www.itroteam.com/leave-a-review/
|
4 |
Tags: multilingual popup, popup, popup message, popuup optin, popup box, popup ads, popup advertising, popup block, popup content warning, fancy box, fancy popup, advertising popup, pop-up, lightbox popup
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.2.2
|
7 |
Requires PHP: 7.0
|
8 |
-
Stable tag: 5.2
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
12 |
-
Display a popup to your WordPress site: age
|
13 |
|
14 |
== Description ==
|
15 |
|
@@ -132,6 +132,9 @@ LIVE DEMOS - [CLICK HERE!](https://www.itroteam.com/wordpress-popup-samples-demo
|
|
132 |
BACKEND SCREENSHOT - [CLICK HERE!](https://www.itroteam.com/wordpress-popup-samples-demos/#backend)
|
133 |
|
134 |
== Changelog ==
|
|
|
|
|
|
|
135 |
= 5.1 =
|
136 |
ADDED: control for logged users for popup display
|
137 |
|
@@ -407,6 +410,9 @@ bug fixed: color table now works in admin pannel.
|
|
407 |
First released version.
|
408 |
|
409 |
== Upgrade Notice ==
|
|
|
|
|
|
|
410 |
= 5.0.2 =
|
411 |
IMPROVED: system info on the popup admin page
|
412 |
ADDED: force table installation in case something gone wrong during plugin activation
|
1 |
=== ITRO Popup Plugin ===
|
2 |
+
Contributors: ITRO,robertourbani
|
3 |
Donate link: https://www.itroteam.com/leave-a-review/
|
4 |
Tags: multilingual popup, popup, popup message, popuup optin, popup box, popup ads, popup advertising, popup block, popup content warning, fancy box, fancy popup, advertising popup, pop-up, lightbox popup
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.2.2
|
7 |
Requires PHP: 7.0
|
8 |
+
Stable tag: 5.2.1
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
12 |
+
Display a popup to your WordPress site: age verification popup for adult-content site ★ multilanguage popup with qTransalte-X ★ very easy to use
|
13 |
|
14 |
== Description ==
|
15 |
|
132 |
BACKEND SCREENSHOT - [CLICK HERE!](https://www.itroteam.com/wordpress-popup-samples-demos/#backend)
|
133 |
|
134 |
== Changelog ==
|
135 |
+
= 5.2.1 =
|
136 |
+
FIXED: user role permissions to manage popups
|
137 |
+
|
138 |
= 5.1 =
|
139 |
ADDED: control for logged users for popup display
|
140 |
|
410 |
First released version.
|
411 |
|
412 |
== Upgrade Notice ==
|
413 |
+
= 5.0.3 =
|
414 |
+
Fixed: user role permissions to manage popups
|
415 |
+
|
416 |
= 5.0.2 =
|
417 |
IMPROVED: system info on the popup admin page
|
418 |
ADDED: force table installation in case something gone wrong during plugin activation
|