ITRO Popup Plugin - Version 5.2.1

Version Description

FIXED: user role permissions to manage popups

Download this release

Release Info

Developer robertourbani
Plugin Icon 128x128 ITRO Popup Plugin
Version 5.2.1
Comparing to
See all releases

Code changes from version 5.2 to 5.2.1

Files changed (4) hide show
  1. admin/popup-admin.php +699 -564
  2. functions/core-function.php +32 -1
  3. mc-main.php +2 -2
  4. 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 ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
 
 
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 ( empty(array_intersect($userRoles, $allowedRoles)) && !in_array( 'administrator',$userRoles) ) {
15
- wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
16
  }
17
 
18
  /* force table installation */
19
- if( isset($_POST['force_tables_installation']) )
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( !isset($submitted_form ))
28
- {
29
- $opt_name=array(
30
- /*opt 0*/'popup_time',
31
- /*opt 1*/'popup_top_margin',
32
- /*opt 2*/'cookie_time_exp',
33
- /*opt 3*/'popup_width',
34
- /*opt 4*/'popup_background',
35
- /*opt 5*/'popup_border_color',
36
- /*opt 6*/'age_restriction',
37
- /*opt 7*/'enter_button_text',
38
- /*opt 8*/'leave_button_text',
39
- /*opt 9*/'leave_button_url',
40
- /*opt 10*/'enter_button_bg_color',
41
- /*opt 11*/'enter_button_border_color',
42
- /*opt 12*/'leave_button_bg_color',
43
- /*opt 13*/'leave_button_border_color',
44
- /*opt 14*/'enter_button_font_color',
45
- /*opt 15*/'leave_button_font_color',
46
- /*opt 16*/'popup_position',
47
- /*opt 17*/'popup_height',
48
- /*opt 18*/'page_selection',
49
- /*opt 19*/'blog_home',
50
- /*opt 20*/'popup_border_radius',
51
- /*opt 21*/'count_font_color',
52
- /*opt 22*/'background_select',
53
- /*opt 23*/'popup_delay',
54
- /*opt 24*/'popup_unlockable',
55
- /*opt 25*/'popup_bg_opacity',
56
- /*opt 26*/'opaco_bg_color',
57
- /*opt 27*/'popup_border_width',
58
- /*opt 28*/'advanced_settings',
59
- /*opt 29*/'show_countdown',
60
- /*opt 30*/'auto_margin_check',
61
- /*opt 31*/'popup_padding',
62
- /*opt 32*/'disable_mobile',
63
- /*opt 33*/'cross_selected',
64
- /*opt 34*/'enter_button_url',
65
- /*opt 35*/'absolute_mobile_pos',
66
- /*opt 36*/'countdown_text',
67
- /*opt 37*/'close_cross_url',
68
- /*opt 38*/'users_display'
69
- );
70
-
71
- $submitted_form = 'mt_submit_hidden';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  }
73
 
74
  /* ordered options */
75
- for($i=0;$i<count($opt_name); $i++)
76
- {
77
- /* See if the user has posted us some information */
78
- /* If they did, this hidden field will be set to 'Y' */
79
- if( isset($_POST[ $submitted_form ]) && $_POST[ $submitted_form ] == 'Y' )
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
- if(isset($_POST['roles'])){
144
- $roles_users=json_encode($_POST['roles']);
145
- itro_update_option('roles',$roles_users);
 
 
146
  }
147
- else{
148
- itro_update_option('roles',NULL);
 
 
 
 
 
 
 
 
 
 
 
149
  }
150
- }else{
151
- //WP Editor Content
152
- $field_value = stripslashes(itro_get_field( 'custom_html' ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  }
154
 
155
  /* delete tables on plugin uninstall option */
156
- if( isset($_POST['delete_data_hidden']) && $_POST['delete_data_hidden'] == 'Y' )
157
- {
158
- // wp token check
159
- check_admin_referer('ipp_save_data','ipp_cleardb_nonce_fld');
160
- if( isset($_POST['delete_data']) )
161
- {
162
- itro_update_option('delete_data', $_POST['delete_data']);
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( isset($_POST[ $submitted_form ]) && $_POST[ $submitted_form ] == 'Y' || isset($_POST['delete_data_hidden']) && $_POST['delete_data_hidden'] == 'Y' ) {
172
- ?>
173
- <div class="updated"><p><strong><?php _e('settings saved.', 'itro-plugin' ); ?></strong></p></div>
174
- <?php
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
- <h1 style="float:left;"><?php _e( 'ITRO Popup Plugin - Settings', 'itro-plugin');?></h1>
181
- <h4 style="float:right; margin-right:30px;">VER: <?php echo $ITRO_VER; ?></h4>
182
- </div>
183
-
184
- <form id="optionForm" method="post">
185
- <?php wp_nonce_field('ipp_save_data', 'ipp_sec_nonce_fld'); ?>
186
- <div id="leftColumn">
187
- <!-- Settings form !-->
188
- <div id="formContainer">
189
-
190
- <!--------- General options --------->
191
- <?php echo itro_onOff('genOption','hidden');?>
192
- <p class="wpstyle" onClick="onOff_genOption();"><?php _e("General Popup Option:", 'itro-plugin' ); ?> </p>
193
- <div id="genOption">
194
- <input type="hidden" name="<?php echo $submitted_form; ?>" value="Y">
195
-
196
- <!-- advanced settings checkbox !-->
197
- <p>
198
- <input type="checkbox" id="<?php echo $opt_name[28]; ?>" name="<?php echo $opt_name[28]; ?>" value="yes" <?php if($opt_val[28]=='yes' ){echo 'checked="checked"';} ?>>
199
- <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>
200
- <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e('Display many other options','itro-plugin');?>" />
201
- </p>
202
-
203
- <!-- roles !-->
204
- <p>
205
- <h3><?php _e("SELECT THE ROLE","itro-plugin") ?></h3>
206
- <?php
207
- $checked="";
208
- $roles_obj = new WP_Roles();
209
- foreach ($roles_obj->roles as $role=>$role_val) {
210
- $allowedRoles = json_decode(itro_get_option('roles'));
211
- if(in_array($role,$allowedRoles)){
212
- $checked="checked";
213
- } else {
214
- $checked="";
215
- }
216
- if($role=='administrator'){
217
- $disabled='disabled';
218
- } else {
219
- $disabled='';
220
- }
221
- echo "<input type='checkbox' name='roles[]' id='roles_$role' value='$role' $checked $disabled>";
222
- echo '<label for="roles_'.$role.'">'.$role_val['name'].'</label>';
223
- echo "<br><br>";
224
- }
225
- ?>
226
- </p>
227
-
228
- <!-- popup display location!-->
229
- <p>
230
- <h3><?php _e("DECIDE WHERE POPUP WILL BE DISPLAYED","itro-plugin")?></h3>
231
- <h4>For the users:</h4>
232
- <fieldset>
233
- <input type="radio" name="<?php echo $opt_name[38];?>" id="clickable_a" value="all" <?php if($opt_val[38]=='all'){echo 'checked="checked"';} ?>/> <label for="clickable_a"> <?php _e('All users', 'itro-plugin'); ?> </label> &nbsp;&nbsp;&nbsp;
234
- <input type="radio" name="<?php echo $opt_name[38];?>" id="clickable_b" value="not_logged" <?php if($opt_val[38]=='not_logged'){echo 'checked="checked"';} ?>/> <label for="clickable_b"> <?php _e('Not logged in users ', 'itro-plugin'); ?> </label> &nbsp;&nbsp;&nbsp;
235
- <input type="radio" name="<?php echo $opt_name[38];?>" id="clickable_c" value="logged" <?php if($opt_val[38]=='logged' || $opt_name[38]==NULL){echo 'checked="checked"';} ?>/> <label for="clickable_c"> <?php _e('Logged in users', 'itro-plugin'); ?> </label>
236
- </fieldset>
237
- <h4>For the page:</h4>
238
- <fieldset>
239
- <input type="radio" id="only_selected" name="<?php echo $opt_name[18];?>" value="some"<?php if($opt_val[18]=='some'){echo 'checked="checked"';} ?>/> <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' ; ?>" title="<?php _e("Multiple choices with CTRL+Click or SHIFT+Arrow up or down",'itro-plugin');?>">&nbsp;&nbsp;&nbsp;
240
- <input type="radio" id="only_selected_a" name="<?php echo $opt_name[18];?>" value="all" <?php if($opt_val[18]=='all' ){echo 'checked="checked"';} ?>/> <label for="only_selected_a"> <?php _e("All pages", 'itro-plugin' ); ?> </label> &nbsp;&nbsp;&nbsp;
241
- <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){echo 'checked="checked"';} ?>/> <label for="only_selected_b"> <?php _e("No page", 'itro-plugin' ); ?> </label>
242
- </fieldset>
243
- <div onClick="document.getElementById('only_selected').checked = true;">
244
- <select name="<?php echo $opt_name[19]; ?>" multiple size="1">
245
- <option onmouseover="itro_check_state(this)" onmouseup="itro_select(this);" value="yes" <?php if($opt_val[19]=='yes' ){echo 'selected="select"';} ?> ><?php _e("Blog homepage","itro-plugin")?></option>
246
- </select>
247
- <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" 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');?>" />
248
- <br>
249
- <?php
250
- /* list of published pages */
251
- itro_list_pages();
252
- ?>
253
- </div>
254
- </p>
255
-
256
- <!-- disable esc key !-->
257
- <h3><?php _e("GENERAL SETTINGS","itro-plugin")?></h3>
258
- <p id="<?php echo $opt_name[24]; ?>_div">
259
- <input type="checkbox" id="<?php echo $opt_name[24]; ?>" name="<?php echo $opt_name[24]; ?>" value="yes" <?php if($opt_val[24] == 'yes' ){echo 'checked="checked"';} ?> />
260
- <span onclick="itro_mutual_check('<?php echo $opt_name[24]; ?>','','')"><?php _e("Disable easy closing", 'itro-plugin' ); ?></span>
261
- <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>"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');?>" >
262
- </p>
263
-
264
- <!-- popup seconds!-->
265
- <div style="display:table; height:10px; padding-bottom:5px;">
266
- <span style="float:left;" ><?php _e("Popup seconds:", 'itro-plugin' ); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e("Set seconds until the popup automatically close. Set it to zero to disable countdown.",'itro-plugin');?>" ></span>
267
- &nbsp;&nbsp;&nbsp;
268
- <?php itro_slidebar( $opt_name[0] , $opt_val[0] , 0 , 120 , 1, 0, '') ?>
269
- <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">
270
- </div>
271
-
272
- <!-- popup delay!-->
273
- <div id="<?php echo $opt_name[23]; ?>_div" style="display:table; height:10px; padding-bottom:5px;">
274
- <span style="float:left;" ><?php _e("Popup delay:", 'itro-plugin' ); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e("Set seconds before the popup will be displayed",'itro-plugin');?>" ></span>
275
- &nbsp;&nbsp;&nbsp;
276
- <?php itro_slidebar( $opt_name[23] , $opt_val[23] , 0 , 120 , 1, 0, '') ?>
277
- <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">
278
- </div>
279
-
280
- <!-- next time visualization !-->
281
- <div style="display:table; height:10px; padding-bottom:5px;">
282
- <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' ; ?>" title="<?php _e("Set time for the next visualization of popup, to prevent annoying repeated visualizations, when someone visit pages",'itro-plugin');?>" ></span>
283
- &nbsp;&nbsp;&nbsp;
284
- <?php itro_slidebar( $opt_name[2] , $opt_val[2] , 0 , 720 , 6, 0, '') ?>
285
- <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">
286
- </div>
287
-
288
- <input value="<?php _e("Delete cookie", 'itro-plugin' ); ?>" type="button" class="button" 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);});">
289
- <span id="cookie_msg" style="display:none;background-color:green;"><?php _e("Cookie deleted!", 'itro-plugin' ); ?></span>
290
-
291
- <!-- countdown settings !-->
292
- <p id="<?php echo $opt_name[29]; ?>_div">
293
- <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' ){echo 'checked="checked"';} ?> />&nbsp;&nbsp;
294
- <span onclick="itro_mutual_check('<?php echo $opt_name[29]; ?>','','')"><?php _e("Show countdown", 'itro-plugin' ); ?></span>
295
- <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" 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');?>" >
296
- <br>
297
- <?php _e("Countdown text:", 'itro-plugin' ); ?>
298
- <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');?>" >
299
- <input type="text" placeholder="This popup will close in:" name="<?php echo $opt_name[36]; ?>" value="<?php echo $opt_val[36]; ?>" size="40">
300
- <br>
301
- <?php _e("Countdown font color:", 'itro-plugin' ); ?>
302
- <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e('Select the countdown font color.','itro-plugin');?>" >
303
- <input type="text" class="color" name="<?php echo $opt_name[21]; ?>" value="<?php echo $opt_val[21]; ?>" size="10">
304
- </p>
305
-
306
- <h3><?php _e("POPUP ASPECT","itro-plugin")?></h3>
307
-
308
- <!-- popup width !-->
309
- <div style="display:table; height:10px; padding-bottom:5px;">
310
- <span style="float:left;" ><?php _e("Popup width:", 'itro-plugin' ); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e("Use the % to change width dinamically with the browser window , or px for fixed dimension i.e: 30% or 200px",'itro-plugin');?>" ></span>
311
- &nbsp;&nbsp;&nbsp;
312
- <?php itro_slidebar( $opt_name[3] , $opt_val[3] , 0 , 1500 , 10, 0, 'px') ?>
313
- <?php itro_slidebar( $opt_name[3] , $opt_val[3] , 0 , 100 , 1, 0, 'perc') ?>
314
- <input type="text" class="itro_text_input" style="<?php if( itro_get_option('select_' . $opt_name[3]) != 'px' ) { echo 'display:none;'; } ?>" id="<?php echo 'px_' . $opt_name[3]; ?>" name="<?php echo 'px_' . $opt_name[3]; ?>" value="<?php echo $px_opt_val[3]; ?>" size="1">
315
- <input type="text" class="itro_text_input" style="<?php if( itro_get_option('select_' . $opt_name[3]) != 'perc' ) { echo 'display:none;'; } ?>" id="<?php echo 'perc_' . $opt_name[3]; ?>" name="<?php echo 'perc_' . $opt_name[3]; ?>" value="<?php echo $perc_opt_val[3]; ?>" size="1">
316
- <select id="select_<?php echo $opt_name[3]; ?>" name="select_<?php echo $opt_name[3]; ?>" style="position:relative; left:7px;">
317
- <option value="px" onClick="itro_enable_<?php echo $opt_name[3]; ?>('px')" <?php if(itro_get_option('select_' . $opt_name[3])=='px') {echo 'selected="select"';} ?>>px</option>
318
- <option value="perc" onClick="itro_enable_<?php echo $opt_name[3]; ?>('perc')" <?php if(itro_get_option('select_' . $opt_name[3])=='perc') {echo 'selected="select"';} ?>>%</option>
319
- </select>
320
- </div>
321
-
322
- <!-- popup height !-->
323
- <div id="<?php echo $opt_name[17]; ?>_div" style="display:table; height:10px; padding-bottom:5px;">
324
- <span style="float:left;" ><?php _e("Popup height:", 'itro-plugin' ); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e("Select auto to adapt popup height to the content",'itro-plugin');?>" ></span>
325
- &nbsp;&nbsp;&nbsp;
326
- <?php itro_slidebar( $opt_name[17] , $opt_val[17] , 0 , 750 , 5, 0, 'px') ?>
327
- <?php itro_slidebar( $opt_name[17] , $opt_val[17] , 0 , 100 , 1, 0, 'perc') ?>
328
- <input type="text" class="itro_text_input" style="<?php if( itro_get_option('select_' . $opt_name[17]) != 'px' ) { echo 'display:none;'; } ?>" id="<?php echo 'px_' . $opt_name[17]; ?>" name="<?php echo 'px_' . $opt_name[17]; ?>" value="<?php echo $px_opt_val[17]; ?>" size="1">
329
- <input type="text" class="itro_text_input" style="<?php if( itro_get_option('select_' . $opt_name[17]) != 'perc' ) { echo 'display:none;'; } ?>" id="<?php echo 'perc_' . $opt_name[17]; ?>" name="<?php echo 'perc_' . $opt_name[17]; ?>" value="<?php echo $perc_opt_val[17]; ?>" size="1">
330
- <select id="select_<?php echo $opt_name[17]; ?>" name="select_<?php echo $opt_name[17]; ?>" style="position:relative; left:7px;">
331
- <option value="px" onClick="itro_enable_<?php echo $opt_name[17]; ?>('px')" <?php if(itro_get_option('select_' . $opt_name[17])=='px') {echo 'selected="select"';} ?>>px</option>
332
- <option value="perc" onClick="itro_enable_<?php echo $opt_name[17]; ?>('perc')" <?php if(itro_get_option('select_' . $opt_name[17])=='perc') {echo 'selected="select"';} ?>>%</option>
333
- <option value="auto" onClick="itro_disable_<?php echo $opt_name[17]; ?>();" <?php if(itro_get_option('select_' . $opt_name[17])=='auto') {echo 'selected="select"';} ?>>auto</option>
334
- </select>
335
- </div>
336
-
337
- <!-- background and border color !-->
338
- <p><?php _e("Popup background color", 'itro-plugin' ); ?>
339
- <input type="text" class="color" name="<?php echo $opt_name[4]; ?>" value="<?php echo $opt_val[4]; ?>" size="10">&nbsp;&nbsp;&nbsp;&nbsp;
340
- <?php _e("Popup border color:", 'itro-plugin' ); ?>
341
- <input type="text" class="color" name="<?php echo $opt_name[5]; ?>" value="<?php echo $opt_val[5]; ?>" size="10">
342
- </p>
343
-
344
- <!-- border radius !-->
345
- <div id="<?php echo $opt_name[20]; ?>_div" style="display:table; height:10px; padding-bottom:5px;" >
346
- <span style="float:left;" ><?php _e("Popup border radius(px):", 'itro-plugin' ); ?></span>
347
- &nbsp;&nbsp;&nbsp;
348
- <?php itro_slidebar( $opt_name[20] , $opt_val[20] , 0 , 200 , 1, 0, '') ?>
349
- <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">
350
- </div>
351
-
352
- <!-- border width !-->
353
- <div id="<?php echo $opt_name[27]; ?>_div" style="display:table; height:10px; padding-bottom:5px;" >
354
- <span style="float:left;" ><?php _e("Popup border width(px):", 'itro-plugin' ); ?></span>
355
- &nbsp;&nbsp;&nbsp;
356
- <?php itro_slidebar( $opt_name[27] , $opt_val[27] , 0 , 50 , 1, 0, '') ?>
357
- <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">
358
- </div>
359
-
360
- <!-- popup padding !-->
361
- <div id="<?php echo $opt_name[31]; ?>_div" style="display:table; height:10px; padding-bottom:5px;" >
362
- <span style="float:left;" ><?php _e("Popup padding(px):", 'itro-plugin' ); ?></span>
363
- &nbsp;&nbsp;&nbsp;
364
- <?php itro_slidebar( $opt_name[31] , $opt_val[31] , 0 , 100 , 1, 0, '') ?>
365
- <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">
366
- </div>
367
-
368
- <!-- popup position !-->
369
- <p><?php _e("Popup position:", 'itro-plugin' ); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e("Setting ABSOLUTE the popup will be static on the page. Setting FIXED it will scroll with the page.",'itro-plugin');?>" >
370
- <select name="<?php echo $opt_name[16]; ?>" style="min-width:100px;">
371
- <option value="absolute" <?php if(itro_get_option($opt_name[16])=='absolute') {echo 'selected="select"';} ?> >Absolute</option>
372
- <option value="fixed" <?php if(itro_get_option($opt_name[16])=='fixed') {echo 'selected="select"';} ?> >Fixed</option>
373
- </select>
374
- </p>
375
-
376
- <h4><?php _e("TOP MARGIN",'itro-plugin');?></h4>
377
- <p>
378
- <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' ){echo 'checked="checked"';} ?> />
379
- <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>
380
- <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e("The system will try to center the popup automatically, unselect it if you encounter any issues",'itro-plugin');?>" >
381
- </p>
382
-
383
- <!-- popup top margin !-->
384
- <div id="top_margin_slider" style=" <?php if(itro_get_option($opt_name[30])=='yes' ){echo 'display:none';} else {echo 'display:table';} ?>; height:10px; padding-bottom:5px;" >
385
- <span style="float:left;" ><?php _e("Popup top margin(px):", 'itro-plugin' ); ?></span>
386
- &nbsp;&nbsp;&nbsp;
387
- <?php itro_slidebar( $opt_name[1] , $opt_val[1] , 0 , 750 , 5, 0, '') ?>
388
- <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">
389
- </div>
390
- <?php echo itro_show_hide(array('top_margin_slider'), $opt_name[30], 'table',false, array('yellow',300)); ?>
391
-
392
- <h4><?php _e("BACKGROUND IMAGE",'itro-plugin');?></h4>
393
- <a href="<?php if ( itro_get_option('background_source') == NULL ) {echo 'javascript:void(0)';} else { echo itro_get_option('background_source'); }?>"><?php _e('Show image','itro-plugin')?></a>
394
-
395
- <input type="radio" name="<?php echo $opt_name[22];?>" value="" <?php if($opt_val[22]== 'no' || $opt_val[22] == NULL ){echo 'checked="checked"';} ?>/>
396
- <?php _e("No background",'itro-plugin');?><br>
397
- <input type="radio" id="yes_bg" name="<?php echo $opt_name[22];?>" value="yes" <?php if( $opt_val[22]== 'yes' ){echo 'checked="checked"';} ?>/>
398
- <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'); ?>" />
399
- <input class="button ipp_upload_button" type="button" name="bg_upload_button" value="<?php _e('Upload Image','itro-plugin') ?>" />
400
-
401
-
402
- <div id="<?php echo $opt_name[30]; ?>_div">
403
- <h4><?php _e("OPAQUE LAYER",'itro-plugin');?></h4>
404
- <!-- background opacity !-->
405
- <div style="display:table; height:10px; padding-bottom:5px;">
406
- <span style="float:left;" ><?php _e("Layer opacity", 'itro-plugin' ); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e("Set the opacity of opaque layer under the popup.",'itro-plugin');?>" ></span>
407
- &nbsp;&nbsp;&nbsp;
408
- <?php itro_slidebar( $opt_name[25] , $opt_val[25] , 0 , 1 , 0.05 , 2 , '' ) ?>
409
- <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">
410
- </div>
411
- <script type="text/javascript">
412
- document.getElementById("<?php echo $opt_name[25]; ?>_slider_container").addEventListener("mousedown", update, false);
413
- document.getElementById("<?php echo $opt_name[25]; ?>_slider_container").addEventListener("mouseup", update, false);
414
- document.getElementById("<?php echo $opt_name[25]; ?>_slider_container").addEventListener("keydown", update, false);
415
- function update()
416
- {
417
- document.getElementById("<?php echo $opt_name[26]; ?>").style.opacity = document.getElementById("<?php echo $opt_name[25]; ?>").value;
418
- document.addEventListener("mousemove", update, false);
419
- }
420
- function stop()
421
- {
422
- document.removeEventListener("mousemove", update, false);
423
- }
424
- </script
425
-
426
- <!-- opaco color !-->
427
- <p><?php _e("Layer color", 'itro-plugin' ); ?>
428
- <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">&nbsp;&nbsp;&nbsp;&nbsp;
429
- </p>
430
-
431
- <h4><?php _e("CLOSE CROSS",'itro-plugin');?></h4>
432
- <!-- close cross selection !-->
433
- <p><?php _e("Select image", 'itro-plugin' ); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e("Select the colour combination of the closing cross on the upper right of popup.",'itro-plugin');?>" >
434
- <select name="<?php echo $opt_name[33]; ?>" style="min-width:100px;">
435
- <option value="black" <?php if(itro_get_option($opt_name[33])=='black') {echo 'selected="select"';} ?> ><?php _e("Black", 'itro-plugin' ); ?></option>
436
- <option value="white" <?php if(itro_get_option($opt_name[33])=='white') {echo 'selected="select"';} ?> ><?php _e("White", 'itro-plugin' ); ?></option>
437
- <option value="white_border" <?php if(itro_get_option($opt_name[33])=='white_border') {echo 'selected="select"';} ?> ><?php _e("White with border", 'itro-plugin' ); ?></option>
438
- <option value="url" <?php if(itro_get_option($opt_name[33])=='url') {echo 'selected="select"';} ?> ><?php _e("Custom URL", 'itro-plugin' ); ?></option>
439
- </select>
440
- <!-- custom cross image url !-->
441
- <p>
442
- <?php _e("Image custom URL",'itro-plugin');?>
443
- <a href="<?php if ( $opt_val[37] == NULL ) {echo 'javascript:void(0)';} else { echo $opt_val[37]; }?>"><?php _e('Show image','itro-plugin')?></a>
444
- <input class="upload" onClick="select();" type="text" name="<?php echo $opt_name[37]; ?>" size="50" value="<?php echo $opt_val[37]; ?>" />
445
- <input class="button ipp_upload_button" type="button" name="close_img_upload" value="<?php _e('Upload Image','itro-plugin') ?>" />
446
- </p>
447
- <?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' );?>
448
- </p>
449
-
450
- <!-- RESPONSIVE SETTINGS -->
451
- <h3><?php _e("RESPONSIVE SETTINGS","itro-plugin")?></h3>
452
- <p>
453
- <!-- disable on mobile -->
454
- <input type="checkbox" id="<?php echo $opt_name[32]; ?>" name="<?php echo $opt_name[32]; ?>" value="yes" <?php if($opt_val[32] == 'yes' ){echo 'checked="checked"';} ?> />
455
- <span onclick="itro_mutual_check('<?php echo $opt_name[32]; ?>','','')"><?php _e("Disable on mobile device", 'itro-plugin' ); ?></span>
456
- <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');?>" >
457
- &nbsp;&nbsp;&nbsp;&nbsp;
458
- <!-- absolute position for mobile -->
459
- <input type="checkbox" id="<?php echo $opt_name[35]; ?>" name="<?php echo $opt_name[35]; ?>" value="yes" <?php if($opt_val[35] == 'yes' ){echo 'checked="checked"';} ?> />
460
- <span onclick="itro_mutual_check('<?php echo $opt_name[35]; ?>','','')"><?php _e("Absolute position for mobile", 'itro-plugin' ); ?></span>
461
- <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>"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');?>" >
462
-
463
- </p>
464
- </div>
465
-
466
- </div>
467
-
468
- <!------------ Age restriction option ---------->
469
- <?php echo itro_onOff('ageRestSettings','hidden');?>
470
- <p class="wpstyle" onClick="onOff_ageRestSettings();"><?php _e("Age restriction settings:", 'itro-plugin' ); ?> </p>
471
- <div id="ageRestSettings">
472
- <p>
473
- <input id="<?php echo $opt_name[6]; ?>" type="checkbox" name="<?php echo $opt_name[6]; ?>" value="yes" <?php if($opt_val[6]=='yes' ){echo 'checked="checked"';} ?> />
474
- <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>
475
- </p>
476
- <div id="<?php echo $opt_name[6]; ?>_div">
477
- <p><?php _e("Enter button text:", 'itro-plugin' ); ?>
478
- <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">
479
- </p>
480
- <p><?php _e("Enter button url:", 'itro-plugin' ); ?>
481
- <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">
482
- </p>
483
-
484
- <div id="<?php echo $opt_name[6] . '_advanced_1'; ?>">
485
- <p><?php _e("Enter button background color:", 'itro-plugin' ); ?>
486
- <input type="text" class="color" name="<?php echo $opt_name[10]; ?>" value="<?php echo $opt_val[10]; ?>" size="10">
487
- </p>
488
- <p><?php _e("Enter button border color:", 'itro-plugin' ); ?>
489
- <input type="text" class="color" name="<?php echo $opt_name[11]; ?>" value="<?php echo $opt_val[11]; ?>" size="10">
490
- </p>
491
- <p><?php _e("Enter button font color:", 'itro-plugin' ); ?>
492
- <input type="text" class="color" name="<?php echo $opt_name[14]; ?>" value="<?php echo $opt_val[14]; ?>" size="10">
493
- </p>
494
- </div>
495
-
496
- <p><?php _e("Leave button text:", 'itro-plugin' ); ?>
497
- <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">
498
- </p>
499
- <p><?php _e("Leave button url:", 'itro-plugin' ); ?>
500
- <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">
501
- </p>
502
-
503
- <div id="<?php echo $opt_name[6] . '_advanced_2'; ?>">
504
- <p><?php _e("Leave button background color:", 'itro-plugin' ); ?>
505
- <input type="text" class="color" name="<?php echo $opt_name[12]; ?>" value="<?php echo $opt_val[12]; ?>" size="10">
506
- </p>
507
- <p><?php _e("Leave button border color:", 'itro-plugin' ); ?>
508
- <input type="text" class="color" name="<?php echo $opt_name[13]; ?>" value="<?php echo $opt_val[13]; ?>" size="10">
509
- </p>
510
- <p><?php _e("Leave button font color:", 'itro-plugin' ); ?>
511
- <input type="text" class="color" name="<?php echo $opt_name[15]; ?>" value="<?php echo $opt_val[15]; ?>" size="10">
512
- </p>
513
- </div>
514
-
515
- </div>
516
- </div>
517
- <?php echo itro_show_hide(array($opt_name[6] . '_div'), $opt_name[6], 'table', true, array('yellow',300)); ?>
518
- </div>
519
- <hr>
520
- <p class="submit">
521
- <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />&nbsp;&nbsp;&nbsp;&nbsp;
522
- <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' )?>">
523
- </p>
524
- </div>
525
-
526
- <div id="rightColumn">
527
- <!-- A simple not annoying banner, please do not remove, we use it to quickly comunicate with you about premium and free! !-->
528
- <p class="wpstyle" onClick="jQuery('#premium_ads').toggle('blind');"><?php _e('ITRO Popup messages', 'itro-plugin'); ?> </p>
529
- <div id="premium_ads" style="text-align: center;">
530
- <a target="_blank" href="http://www.itroteam.com"><img title="TRY IT FOR FREE!!!" src="https://www.itroteam.com/plugins/premium_banner.png"></a>
531
- </div>
532
-
533
- <input type="hidden" name="<?php echo $submitted_form; ?>" value="Y">
534
- <!------- Custom html field -------->
535
- <p class="wpstyle" onClick="jQuery('#customHtmlForm').toggle();"><?php _e("Your text (or HTML code):", 'itro-plugin' ); ?> </p>
536
- <div id="customHtmlForm">
537
- <?php
538
- $content = stripslashes($field_value);
539
- wp_editor( $content, 'custom_html', array('textarea_name'=> 'custom_html','teeny'=>false, 'media_buttons'=>true, 'wpautop'=>false ) ); ?>
540
- <br><br>
541
- <hr>
542
- <p class="submit">
543
- <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />&nbsp;&nbsp;&nbsp;&nbsp;
544
- <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' )?>">
545
- </p>
546
- </div>
547
- </div>
548
- </form>
549
- <div id="rightColumn2">
550
- <div id="donateForm">
551
- <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" src="<?php echo itroImages . '5_stars.png';?>"></a></h3>
552
- <p>
553
- <?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");?>
554
- </p>
555
- </div>
556
- <p class="wpstyle" onClick="jQuery('#debug_info').toggle();"><?php _e("System Status", 'itro-plugin' ); ?> </p>
557
- <div method="POST" action="" id="debug_info" style="display:none;">
558
- <?php echo itro_get_serverinfo(); ?>
559
- <form method="post" style="clear:both;">
560
- <?php wp_nonce_field('ipp_save_data', 'ipp_cleardb_nonce_fld'); ?>
561
- <br>
562
- <hr>
563
- <input type="hidden" name="force_tables_installation" value="Y">
564
- <span><?php _e("FORCE TABLE INSTALLATION", 'itro-plugin' ); ?></span>
565
- <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>"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');?>" >
566
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
567
- <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('FORCE') ?>" />&nbsp;&nbsp;&nbsp;&nbsp;
568
- </form>
569
- </div>
570
- </div>
571
-
572
- <form id="delete_data" method="post" style="clear:both;">
573
- <?php wp_nonce_field('ipp_save_data', 'ipp_cleardb_nonce_fld'); ?>
574
- <br>
575
- <hr>
576
- <input type="hidden" name="delete_data_hidden" value="Y">
577
- <input type="checkbox" id="delete_data" name="delete_data" value="yes" <?php if(itro_get_option('delete_data')=='yes' ){echo 'checked="checked"';} ?> />
578
- <span><?php _e("DELETE ALL DATA ON PLUGIN UNINSTALL", 'itro-plugin' ); ?></span>
579
- <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>"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');?>" >
580
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
581
- <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />&nbsp;&nbsp;&nbsp;&nbsp;
582
- </form>
583
-
584
-
585
- <?php
586
- $itro_hide_args = array(
587
- $opt_name[24] . '_div',
588
- $opt_name[29] . '_div',
589
- $opt_name[17] . '_div',
590
- $opt_name[20] . '_div',
591
- $opt_name[27] . '_div',
592
- $opt_name[30] . '_div',
593
- $opt_name[31] . '_div',
594
- $opt_name[23] . '_div',
595
- $opt_name[6] . '_advanced_1',
596
- $opt_name[6] . '_advanced_2',
597
- );
598
- echo itro_show_hide( $itro_hide_args, $opt_name[28], 'table', true, array('yellow',10000));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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> &nbsp;&nbsp;&nbsp;
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> &nbsp;&nbsp;&nbsp;
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'); ?>">&nbsp;&nbsp;&nbsp;
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> &nbsp;&nbsp;&nbsp;
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
+ &nbsp;&nbsp;&nbsp;
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
+ &nbsp;&nbsp;&nbsp;
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
+ &nbsp;&nbsp;&nbsp;
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
+ } ?> />&nbsp;&nbsp;
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
+ &nbsp;&nbsp;&nbsp;
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
+ &nbsp;&nbsp;&nbsp;
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">&nbsp;&nbsp;&nbsp;&nbsp;
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
+ &nbsp;&nbsp;&nbsp;
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
+ &nbsp;&nbsp;&nbsp;
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
+ &nbsp;&nbsp;&nbsp;
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
+ &nbsp;&nbsp;&nbsp;
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
+ &nbsp;&nbsp;&nbsp;
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">&nbsp;&nbsp;&nbsp;&nbsp;
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
+ &nbsp;&nbsp;&nbsp;&nbsp;
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') ?>"/>&nbsp;&nbsp;&nbsp;&nbsp;
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') ?>"/>&nbsp;&nbsp;&nbsp;&nbsp;
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
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
699
+ <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('FORCE') ?>"/>&nbsp;&nbsp;&nbsp;&nbsp;
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
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
716
+ <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>"/>&nbsp;&nbsp;&nbsp;&nbsp;
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
- add_options_page('Popup Plugin Options', 'ITRO Popup', 'manage_options', itroRootPath . 'admin/popup-admin.php', '');
 
 
 
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,martinalucaroni
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 restriction popup for adult-content site ★ multilanguage popup with qTransalte-X ★ very easy to use
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