ITRO Popup Plugin - Version 4.8

Version Description

ADDED: Fully responsive design. ADDED: Absolute position only for mobile devices.

Download this release

Release Info

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

Code changes from version 4.9.1 to 4.8

admin/popup-admin.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /*
3
- This file is part of ITRO Popup Plugin. (email : support@itroteam.com)
 
4
  */
5
-
6
  global $ITRO_VER;
7
 
8
  if ( !current_user_can( 'manage_options' ) ) {
@@ -47,8 +47,7 @@ if( !isset($submitted_form ))
47
  /*opt 32*/'disable_mobile',
48
  /*opt 33*/'cross_selected',
49
  /*opt 34*/'enter_button_url',
50
- /*opt 35*/'absolute_mobile_pos',
51
- /*opt 36*/'countdown_text'
52
  );
53
  $field_name=array(
54
  /*fld 0*/'custom_html',
@@ -192,12 +191,12 @@ if( isset($_POST[ $submitted_form ]) && $_POST[ $submitted_form ] == 'Y' || isse
192
  </div>
193
  </p>
194
 
195
- <!-- disable esc key !-->
196
  <h3><?php _e("GENERAL SETTINGS","itro-plugin")?></h3>
197
  <p id="<?php echo $opt_name[24]; ?>_div">
198
  <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"';} ?> />
199
- <span onclick="itro_mutual_check('<?php echo $opt_name[24]; ?>','','')"><?php _e("Disable easy closing", 'itro-plugin' ); ?></span>
200
- <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');?>" >
201
  </p>
202
 
203
  <!-- popup seconds!-->
@@ -232,11 +231,7 @@ if( isset($_POST[ $submitted_form ]) && $_POST[ $submitted_form ] == 'Y' || isse
232
  <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;
233
  <span onclick="itro_mutual_check('<?php echo $opt_name[29]; ?>','','')"><?php _e("Show countdown", 'itro-plugin' ); ?></span>
234
  <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');?>" >
235
- <br>
236
- <?php _e("Countdown text:", 'itro-plugin' ); ?>
237
- <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');?>" >
238
- <input type="text" placeholder="This popup will close in:" name="<?php echo $opt_name[36]; ?>" value="<?php echo $opt_val[36]; ?>" size="40">
239
- <br>
240
  <?php _e("Countdown font color:", 'itro-plugin' ); ?>
241
  <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e('Select the countdown font color.','itro-plugin');?>" >
242
  <input type="text" class="color" name="<?php echo $opt_name[21]; ?>" value="<?php echo $opt_val[21]; ?>" size="10">
@@ -431,7 +426,7 @@ if( isset($_POST[ $submitted_form ]) && $_POST[ $submitted_form ] == 'Y' || isse
431
 
432
  <div id="<?php echo $opt_name[6] . '_advanced_2'; ?>">
433
  <p><?php _e("Leave button background color:", 'itro-plugin' ); ?>
434
- <input type="text" class="color" name="<?php echo $opt_name[12]; ?>" value="<?php echo $opt_val[12]; ?>" size="10">
435
  </p>
436
  <p><?php _e("Leave button border color:", 'itro-plugin' ); ?>
437
  <input type="text" class="color" name="<?php echo $opt_name[13]; ?>" value="<?php echo $opt_val[13]; ?>" size="10">
@@ -456,7 +451,7 @@ if( isset($_POST[ $submitted_form ]) && $_POST[ $submitted_form ] == 'Y' || isse
456
  <!-- A simple not annoying banner, please do not remove, we use it to quickly comunicate with you about premium and free! !-->
457
  <p class="wpstyle" onClick="jQuery('#premium_ads').toggle('blind');"><?php _e('ITRO Popup messages', 'itro-plugin'); ?> </p>
458
  <div id="premium_ads" style="text-align: center;">
459
- <a target="_blank" href="http://www.itroteam.com"><img title="TRY IT FOR FREE!!!" src="http://www.itroteam.com/plugins/premium_banner.png"></a>
460
  </div>
461
 
462
  <input type="hidden" name="<?php echo $submitted_form; ?>" value="Y">
1
  <?php
2
  /*
3
+ This file is part of ITRO Popup Plugin.
4
+ email : support@itroteam.com
5
  */
 
6
  global $ITRO_VER;
7
 
8
  if ( !current_user_can( 'manage_options' ) ) {
47
  /*opt 32*/'disable_mobile',
48
  /*opt 33*/'cross_selected',
49
  /*opt 34*/'enter_button_url',
50
+ /*opt 35*/'absolute_mobile_pos'
 
51
  );
52
  $field_name=array(
53
  /*fld 0*/'custom_html',
191
  </div>
192
  </p>
193
 
194
+ <!-- disable esc key and mobile !-->
195
  <h3><?php _e("GENERAL SETTINGS","itro-plugin")?></h3>
196
  <p id="<?php echo $opt_name[24]; ?>_div">
197
  <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"';} ?> />
198
+ <span onclick="itro_mutual_check('<?php echo $opt_name[24]; ?>','','')"><?php _e("Disable ESC key", 'itro-plugin' ); ?></span>
199
+ <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.','itro-plugin');?>" >
200
  </p>
201
 
202
  <!-- popup seconds!-->
231
  <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;
232
  <span onclick="itro_mutual_check('<?php echo $opt_name[29]; ?>','','')"><?php _e("Show countdown", 'itro-plugin' ); ?></span>
233
  <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');?>" >
234
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
 
 
 
235
  <?php _e("Countdown font color:", 'itro-plugin' ); ?>
236
  <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e('Select the countdown font color.','itro-plugin');?>" >
237
  <input type="text" class="color" name="<?php echo $opt_name[21]; ?>" value="<?php echo $opt_val[21]; ?>" size="10">
426
 
427
  <div id="<?php echo $opt_name[6] . '_advanced_2'; ?>">
428
  <p><?php _e("Leave button background color:", 'itro-plugin' ); ?>
429
+ <input type="text" name="<?php echo $opt_name[12]; ?>" value="<?php echo $opt_val[12]; ?>" size="10">
430
  </p>
431
  <p><?php _e("Leave button border color:", 'itro-plugin' ); ?>
432
  <input type="text" class="color" name="<?php echo $opt_name[13]; ?>" value="<?php echo $opt_val[13]; ?>" size="10">
451
  <!-- A simple not annoying banner, please do not remove, we use it to quickly comunicate with you about premium and free! !-->
452
  <p class="wpstyle" onClick="jQuery('#premium_ads').toggle('blind');"><?php _e('ITRO Popup messages', 'itro-plugin'); ?> </p>
453
  <div id="premium_ads" style="text-align: center;">
454
+ <a target="_blank" href="http://www.wordpress-popup-plugin.com"><img title="TRY IT FOR FREE!!!" src="http://www.itroteam.com/plugins/premium_banner.png"></a>
455
  </div>
456
 
457
  <input type="hidden" name="<?php echo $submitted_form; ?>" value="Y">
css/itro-admin-style.css CHANGED
@@ -1,7 +1,3 @@
1
- /*
2
- This file is part of ITRO Popup Plugin. (email : support@itroteam.com)
3
- */
4
-
5
  /* Admin pages styles */
6
  .wpstyle
7
  {
 
 
 
 
1
  /* Admin pages styles */
2
  .wpstyle
3
  {
css/itro-style-functions.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /*
3
- This file is part of ITRO Popup Plugin. (email : support@itroteam.com)
 
4
  */
5
-
6
  function itro_style() { ?>
7
  <style>
8
  /* General styling to prevent white spaces or unwanted visual results */
@@ -142,7 +142,6 @@ function itro_style() { ?>
142
  }
143
  #ipp_mobile_close_txt{
144
  font-weight: bold;
145
- cursor: pointer;
146
  }
147
 
148
  /* RESPONSIVE CSS */
@@ -153,7 +152,7 @@ function itro_style() { ?>
153
  <?php
154
 
155
  if(itro_get_option('absolute_mobile_pos') == 'yes'){
156
- echo "position: absolute; top: 50px";
157
  }
158
  ?>
159
  }
1
  <?php
2
  /*
3
+ Copyright 2013 I.T.RO.® (email : support.itro@live.com)
4
+ This file is part of ITRO Popup Plugin.
5
  */
 
6
  function itro_style() { ?>
7
  <style>
8
  /* General styling to prevent white spaces or unwanted visual results */
142
  }
143
  #ipp_mobile_close_txt{
144
  font-weight: bold;
 
145
  }
146
 
147
  /* RESPONSIVE CSS */
152
  <?php
153
 
154
  if(itro_get_option('absolute_mobile_pos') == 'yes'){
155
+ echo "position: absolute";
156
  }
157
  ?>
158
  }
functions/core-function.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
  /*
3
- This file is part of ITRO Popup Plugin. (email : support@itroteam.com)
 
4
  */
5
  /* ------------------ADD MENU PAGE */
6
  function itro_plugin_menu() {
@@ -18,7 +19,6 @@ function itro_init()
18
  itro_db_init();
19
 
20
  itro_update_option('popup_time',20);
21
- itro_update_option('popup_delay',0);
22
  itro_update_option('cookie_time_exp',0);
23
  itro_update_option('popup_background','#FFFFFF');
24
  itro_update_option('popup_border_color','#F7FF00');
@@ -72,13 +72,6 @@ function itro_check_ver()
72
  /* --------------------------DISPLAY THE POPUP */
73
  function itro_display_popup()
74
  {
75
- global $popup_fired; //it check if there is a popup visualization via shortcode or via automatic visualization
76
-
77
- //if a shortcode was fired it stop everything
78
- if($popup_fired === true){
79
- return;
80
- }
81
-
82
  /* check if it is the preview visualization */
83
  if(!empty($_GET['itro_preview']) && $_GET['itro_preview']=='yes' && is_user_logged_in() ){
84
  $is_preview = true;
@@ -87,8 +80,6 @@ function itro_display_popup()
87
  }
88
 
89
  /* woocommerce shop page identification */
90
- $woo_shop = NULL;
91
- $woo_shop_id = NULL;
92
  if( function_exists('is_shop') && function_exists('woocommerce_get_page_id') ) /* if this functions exist, woocommerce is installed! */
93
  {
94
  if ( is_shop() ) /* if the actual page is the standard woocommerce shop page */
@@ -96,6 +87,11 @@ function itro_display_popup()
96
  $woo_shop = true;
97
  $woo_shop_id = woocommerce_get_page_id( 'shop' );
98
  }
 
 
 
 
 
99
  }
100
 
101
  /* this condition, control if the popup must or not by displayed in a specified page */
@@ -126,14 +122,12 @@ function itro_display_popup()
126
  }
127
  if( $id_match != NULL || $is_preview )
128
  {
129
- $popup_fired = true;
130
  itro_style();
131
  itro_popup_template();
132
  itro_popup_js();
133
  }
134
  break;
135
  case 'all':
136
- $popup_fired = true;
137
  itro_style();
138
  itro_popup_template();
139
  itro_popup_js();
@@ -141,7 +135,6 @@ function itro_display_popup()
141
  case 'none':
142
  if( $is_preview )
143
  {
144
- $popup_fired = true;
145
  itro_style();
146
  itro_popup_template();
147
  itro_popup_js();
@@ -186,27 +179,6 @@ function itro_list_pages()
186
  <?php
187
  }
188
 
189
- /**
190
- * Shortcode for popup appearing
191
- *
192
- * @since 4.9
193
- *
194
- */
195
-
196
- function itro_popup_shortcode(){
197
- global $popup_fired; //it check if there is a popup visualization via shortcode or via automatic visualization
198
- $popup_fired = true;
199
-
200
- ob_start();
201
-
202
- itro_style();
203
- itro_popup_template();
204
- itro_popup_js();
205
-
206
- return ob_get_clean();
207
- }
208
- add_shortcode('itroshowpopup', 'itro_popup_shortcode');
209
-
210
  /* ------------------------- DEBUG INFORMATION ON ADMIN PANNEL */
211
  function itro_get_serverinfo()
212
  {
1
  <?php
2
  /*
3
+ Copyright 2013 I.T.RO.® (email : support.itro@live.com)
4
+ This file is part of ITRO Popup Plugin.
5
  */
6
  /* ------------------ADD MENU PAGE */
7
  function itro_plugin_menu() {
19
  itro_db_init();
20
 
21
  itro_update_option('popup_time',20);
 
22
  itro_update_option('cookie_time_exp',0);
23
  itro_update_option('popup_background','#FFFFFF');
24
  itro_update_option('popup_border_color','#F7FF00');
72
  /* --------------------------DISPLAY THE POPUP */
73
  function itro_display_popup()
74
  {
 
 
 
 
 
 
 
75
  /* check if it is the preview visualization */
76
  if(!empty($_GET['itro_preview']) && $_GET['itro_preview']=='yes' && is_user_logged_in() ){
77
  $is_preview = true;
80
  }
81
 
82
  /* woocommerce shop page identification */
 
 
83
  if( function_exists('is_shop') && function_exists('woocommerce_get_page_id') ) /* if this functions exist, woocommerce is installed! */
84
  {
85
  if ( is_shop() ) /* if the actual page is the standard woocommerce shop page */
87
  $woo_shop = true;
88
  $woo_shop_id = woocommerce_get_page_id( 'shop' );
89
  }
90
+ }
91
+ else
92
+ {
93
+ $woo_shop = NULL;
94
+ $woo_shop_id = NULL;
95
  }
96
 
97
  /* this condition, control if the popup must or not by displayed in a specified page */
122
  }
123
  if( $id_match != NULL || $is_preview )
124
  {
 
125
  itro_style();
126
  itro_popup_template();
127
  itro_popup_js();
128
  }
129
  break;
130
  case 'all':
 
131
  itro_style();
132
  itro_popup_template();
133
  itro_popup_js();
135
  case 'none':
136
  if( $is_preview )
137
  {
 
138
  itro_style();
139
  itro_popup_template();
140
  itro_popup_js();
179
  <?php
180
  }
181
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  /* ------------------------- DEBUG INFORMATION ON ADMIN PANNEL */
183
  function itro_get_serverinfo()
184
  {
functions/database-function.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
  /*
3
- This file is part of ITRO Popup Plugin. (email : support@itroteam.com)
 
4
  */
5
  global $wpdb;
6
  define ('OPTION_TABLE_NAME', $wpdb->prefix . 'itro_plugin_option');
@@ -51,17 +52,13 @@ function itro_update_db()
51
  $wpdb->query("RENAME TABLE wp_itro_plugin_field TO ". $wpdb->prefix ."itro_plugin_field");
52
  }
53
 
54
- if( get_option('itro_prev_ver') <= 4.7 )
55
  {
56
  /* delete the obsolete and useless preview post */
57
  if(itro_get_option('preview_id') != NULL){
58
  wp_delete_post(itro_get_option('preview_id'), true);
59
  }
60
  }
61
- if( get_option('itro_prev_ver') <= 4.91 )
62
- {
63
- itro_update_option('countdown_text', 'This popup will close in:');
64
- }
65
  }
66
 
67
  /* ------------------ PLUGIN OPTION DB MANAGEMENT -------------- */
1
  <?php
2
  /*
3
+ Copyright 2013 I.T.RO.® (email : support.itro@live.com)
4
+ This file is part of ITRO Popup Plugin.
5
  */
6
  global $wpdb;
7
  define ('OPTION_TABLE_NAME', $wpdb->prefix . 'itro_plugin_option');
52
  $wpdb->query("RENAME TABLE wp_itro_plugin_field TO ". $wpdb->prefix ."itro_plugin_field");
53
  }
54
 
55
+ if( get_option('itro_prev_ver') <= 4.6 && $wpdb->prefix != 'wp_' )
56
  {
57
  /* delete the obsolete and useless preview post */
58
  if(itro_get_option('preview_id') != NULL){
59
  wp_delete_post(itro_get_option('preview_id'), true);
60
  }
61
  }
 
 
 
 
62
  }
63
 
64
  /* ------------------ PLUGIN OPTION DB MANAGEMENT -------------- */
functions/js-function.php CHANGED
@@ -1,23 +1,19 @@
1
  <?php
2
  /*
3
- This file is part of ITRO Popup Plugin. (email : support@itroteam.com)
 
4
  */
5
 
6
  /* ------------ LOAD SCRIPTS FOR POPUP VISUALIZATION */
7
  function itro_popup_js()
8
- {
9
- /* check if it is the preview visualization */
10
- if(!empty($_GET['itro_preview']) && $_GET['itro_preview']=='yes' && is_user_logged_in() ){
11
- $is_preview = 'true';
12
- }else {
13
- $is_preview = 'false';
14
- }
15
- ?>
16
  <script type="text/javascript">
17
  /* init var */
18
  itro_cookie_expiration = <?php echo itro_get_option('cookie_time_exp'); ?>;
19
- itro_is_preview = <?php echo $is_preview; ?>;/* pass true if is the preview page. used for cookie control via js due W3 total cache or similar */
20
- jQuery('#ipp_mobile_close_txt').css({color: itro_invert_color(itro_rgb2hex(jQuery('#itro_popup').css('border-bottom-color'))) });
 
 
21
  <?php
22
  if (itro_get_option('age_restriction') == NULL) /* OFF age validation */
23
  {
@@ -30,7 +26,7 @@ function itro_popup_js()
30
  var key = event.keyCode;
31
  if(key==27)
32
  {
33
- jQuery("#itro_popup").fadeOut(function() {jQuery("#itro_opaco").fadeOut();});
34
  }
35
  }; <?php
36
  }
@@ -83,7 +79,7 @@ function itro_popup_js()
83
  if( itro_get_option('auto_margin_check') != NULL )
84
  {?>
85
  var browserWidth = 0, browserHeight = 0;
86
- setInterval(function(){itro_margin_refresh()},500); /* refresh every 0.1 second the popup top margin (needed for browser window resizeing) */
87
  <?php
88
  }?>
89
  </script>
1
  <?php
2
  /*
3
+ Copyright 2013 I.T.RO.® (email : support.itro@live.com)
4
+ This file is part of ITRO Popup Plugin.
5
  */
6
 
7
  /* ------------ LOAD SCRIPTS FOR POPUP VISUALIZATION */
8
  function itro_popup_js()
9
+ { ?>
 
 
 
 
 
 
 
10
  <script type="text/javascript">
11
  /* init var */
12
  itro_cookie_expiration = <?php echo itro_get_option('cookie_time_exp'); ?>;
13
+ itro_is_preview = <?php if ( itro_get_option('preview_id') == get_the_id() ){echo 'true';}else{ echo 'false'; } ?>;
14
+
15
+ /* pass true if is the preview page. used for cookie control via js due W3 total cache or similar */
16
+ itro_is_preview = <?php if( itro_get_option('preview_id') == get_the_id() ){ echo 'true'; }else{ echo 'false'; } ?>;
17
  <?php
18
  if (itro_get_option('age_restriction') == NULL) /* OFF age validation */
19
  {
26
  var key = event.keyCode;
27
  if(key==27)
28
  {
29
+ jQuery("#itro_popup").fadeOut(function() {itro_opaco.style.visibility='Hidden';});
30
  }
31
  }; <?php
32
  }
79
  if( itro_get_option('auto_margin_check') != NULL )
80
  {?>
81
  var browserWidth = 0, browserHeight = 0;
82
+ setInterval(function(){marginRefresh()},100); /* refresh every 0.1 second the popup top margin (needed for browser window resizeing) */
83
  <?php
84
  }?>
85
  </script>
i18n-config.json CHANGED
@@ -6,7 +6,6 @@
6
  "forms":{
7
  "optionForm":{
8
  "fields":{
9
- "countdown_text":{"name":"countdown_text"},
10
  "enter_button_text":{"name":"enter_button_text"},
11
  "leave_button_text":{"name":"leave_button_text"},
12
  "enter_button_url":{"name":"enter_button_url"},
6
  "forms":{
7
  "optionForm":{
8
  "fields":{
 
9
  "enter_button_text":{"name":"enter_button_text"},
10
  "leave_button_text":{"name":"leave_button_text"},
11
  "enter_button_url":{"name":"enter_button_url"},
mc-main.php CHANGED
@@ -1,20 +1,17 @@
1
  <?php
2
  /*
3
  Plugin Name: ITRO Popup Plugin
4
- Plugin URI: http://www.itroteam.com
5
  Description: EN - Show a perfecly centered customizable popup and a popup-system for age-restricted site and allow to insert own HTML code. IT - Visualizza un popup perfettamente centrato e personalizzabile con possibile blocco per i siti con restrizioni di eta' e permette di inserire il proprio codice HTML.
6
  Author: ITRO Team
7
  E-mail: support@itroteam.com
8
  Text Domain: itro-popup
9
- Version: 4.9.1
10
  Author URI: http://www.itroteam.com
11
  */
12
 
13
  global $ITRO_VER;
14
- $ITRO_VER = 4.91;
15
-
16
- global $popup_fired; //it check if there is a popup visualization via shortcode or via automatic visualization
17
- $popup_fired = false;
18
 
19
  define('itroPath', plugins_url() . '/itro-popup/');
20
  define('itroImages', plugins_url() . '/itro-popup/images/');
@@ -69,4 +66,4 @@ add_action( 'wp_enqueue_scripts' , 'itro_load_script' );
69
  add_action('admin_print_scripts', 'itro_admin_scripts');
70
  add_action('admin_print_styles', 'itro_load_admin_styles');
71
  add_action('admin_menu', 'itro_plugin_menu');
72
- ?>
1
  <?php
2
  /*
3
  Plugin Name: ITRO Popup Plugin
4
+ Plugin URI: http://www.wordpress-popup-plugin.com
5
  Description: EN - Show a perfecly centered customizable popup and a popup-system for age-restricted site and allow to insert own HTML code. IT - Visualizza un popup perfettamente centrato e personalizzabile con possibile blocco per i siti con restrizioni di eta' e permette di inserire il proprio codice HTML.
6
  Author: ITRO Team
7
  E-mail: support@itroteam.com
8
  Text Domain: itro-popup
9
+ Version: 4.8
10
  Author URI: http://www.itroteam.com
11
  */
12
 
13
  global $ITRO_VER;
14
+ $ITRO_VER = 4.8;
 
 
 
15
 
16
  define('itroPath', plugins_url() . '/itro-popup/');
17
  define('itroImages', plugins_url() . '/itro-popup/images/');
66
  add_action('admin_print_scripts', 'itro_admin_scripts');
67
  add_action('admin_print_styles', 'itro_load_admin_styles');
68
  add_action('admin_menu', 'itro_plugin_menu');
69
+ ?>
readme.txt CHANGED
@@ -1,27 +1,21 @@
1
  === ITRO Popup Plugin ===
2
  Contributors: ITRO
3
- Donate link: http://www.itroteam.com/
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: 4.5
7
- Stable tag: 4.9.1
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
11
- ITRO Popup display a popup to your WP site: age restriction popup for adult-content site; multilanguage popup with qTransalte-X; very easy to use
 
 
 
12
 
13
  == Description ==
14
 
15
- ITRO Popup Plugin - The BEST WordpPress Popup Plugin
16
-
17
- ITRO Popup is a very lightweight Plugin for Wordpress which allow users to add a fully-customizable, multilanguage pop-up thanks to qTranslate-X.
18
- It has a very user-friendly interface, which allow Wordpress users to easily modify all settings needed for a popup, without coding.
19
- With "Age restricted site" option, the popup block the navigation (for age validation) until the user declare that is above the local country legal age.
20
- It is useful for adult content Wordpress site (tobacco & alcohol selling, violence, bad language, etc...). The leave and the enter button
21
- are separately customizable. Is embedded the Wordpress editor to simplify input whatever you want in your popup.
22
- Popup can be rendered unlockable with the option "Unlockable popup" so it will close only with countdown.
23
- This plugin is basic-user oriented, no code knowledge is required.
24
- Simply the best Wordpress popup plugin!
25
 
26
  ★ Pretty fade-in and fade-out animation.
27
  ★ Need to remove plugin and save data? It is possible!
@@ -41,25 +35,28 @@ Simply the best Wordpress popup plugin!
41
  Thanks to [Viterbo Marketing](https://www.viterbomarketing.com) for website and marketing consulting.
42
 
43
  WANT MORE FEATURES? Try ITRO Wordpress Marketing for free!
44
- [TRY IT FOR FREE!](http://www.itroteam.com/)
45
 
46
- TRANSLATED IN FOLLOWING LANGUAGES:
 
 
 
 
 
 
 
47
 
 
48
  - Italian
49
-
50
  - English
51
-
52
  - French (thanks to Patrice CHASSAING)
53
-
54
  - Serbo-Croatian (thanks to Andrijana Nikolic www.webhostinggeeks.com)
55
-
56
  - Nederlands (thanks to Descamps Gino)
57
 
 
 
58
 
59
- FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itroteam.com/)
60
- DONATE NOW! [DONATE NOW](http://www.itroteam.com/)
61
-
62
- For any problem, please contact us at our site: [CONTACT US](http://www.itroteam.com/)
63
 
64
  Want a more powerful marketing tools?
65
  Try ITRO Wordpress Marketing PRO with a 14 days free trial.
@@ -77,46 +74,30 @@ Try ITRO Wordpress Marketing PRO with a 14 days free trial.
77
  ★ SOCIAL POPUPS
78
  ★ VIDEO EMBEDDING (Youtube and Vimeo)
79
 
80
- [TRY IT FOR FREE!](http://www.itroteam.com/)
81
 
82
  == Installation ==
83
 
84
- FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itroteam.com/)
85
 
86
- DONATE NOW! - HELP US TO DEVELOP FOR YOU! [DONATE NOW](http://www.itroteam.com/)
87
 
88
  1. Unzip `itro-plugin.zip` to the `/wp-content/plugins/` directory or select it by "Add new" in the 'Plugins' menu in WordPress
89
  2. Activate the plugin through the 'Plugins' menu in WordPress
90
  3. Go to "Settings->ITRO Popup" in the admin menu
91
- 4. Enjoy it
92
 
93
  == Frequently Asked Questions ==
94
 
95
- FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itroteam.com/)
96
 
97
- DONATE NOW! - HELP US TO KEEP IT FREE! [DONATE NOW](http://www.itroteam.com/)
98
 
99
  == Screenshots ==
100
 
101
- VIEW LIVE DEMOS ON OUR OFFICIAL SITE - [CLICK HERE!](http://www.itroteam.com/)
102
 
103
  == Changelog ==
104
- = 4.9.1 =
105
- ADDED: customizable text for the countdown
106
- FIXED: overlayng behaviour with iframes in the popup content
107
- FIXED: undefined variable error
108
-
109
- = 4.9 =
110
- ADDED: shortcode for visualization.
111
- ADDED: mobile close tag text automatic font color.
112
- FIXED: mobile close tab not working.
113
- FIXED: popup delay default value set to 0.
114
- IMPROVED: automatic vertical align.
115
-
116
- = 4.8.1 =
117
- FIXED: Popup cookie affect the preview mode.
118
- IMPROVED: Easy closing the popup can be disabled. Nor ESC or clicking outside will close the popup.
119
-
120
  = 4.8 =
121
  ADDED: Fully responsive design.
122
  ADDED: Absolute position only for mobile devices.
@@ -327,17 +308,6 @@ bug fixed: color table now works in admin pannel.
327
  First released version.
328
 
329
  == Upgrade Notice ==
330
- = 4.9 =
331
- ADDED: shortcode for visualization.
332
- ADDED: mobile close tag text automatic font color.
333
- FIXED: mobile close tab not working.
334
- FIXED: popup delay default value set to 0.
335
- IMPROVED: automatic vertical align.
336
-
337
- = 4.8.1 =
338
- FIXED: Popup cookie affect the preview mode.
339
- IMPROVED: Easy closing the popup can be disabled. Nor ESC or clicking outside will close the popup.
340
-
341
  = 4.8 =
342
  ADDED: Fully responsive design.
343
  ADDED: Absolute position only for mobile devices.
@@ -345,10 +315,20 @@ ADDED: Absolute position only for mobile devices.
345
  = 4.7.3 =
346
  IMPROVED: Useless preview page deleted. Preview via GET request.
347
 
 
 
 
 
 
 
 
 
 
 
348
  == Notes ==
349
- FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itroteam.com/)
350
 
351
- DONATE NOW! - HELP US TO KEEP IT FREE! [DONATE NOW](http://www.itroteam.com/)
352
 
353
  We accept all kind of suggestion.
354
  Thanks to Jan Odvarko for jscolor: http://jscolor.com/
1
  === ITRO Popup Plugin ===
2
  Contributors: ITRO
3
+ Donate link: http://www.itroteam.com/donate/
4
+ Tags: multilingual popup, popup, popup message, popu-up opt-in, popup box, popup ads, popup advertising, popup jquery, popup automatic, popup age restriction, popup block, popup violence, popup age validation, popup adult content, popup content warning, fancy box, fancy popup, advertising popup, pop-up, lightbox, lightbox popup
5
  Requires at least: 3.0.1
6
+ Tested up to: 4.4.2
7
+ Stable tag: 4.8
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
11
+ ITRO Popup display a popup to your WP site:
12
+ ★ Age restriction for adult-content site
13
+ ★ Multilanguage popup with qTransalte-X
14
+ ★ Very easy to use
15
 
16
  == Description ==
17
 
18
+ ITRO Popup Plugin - The BEST WP Popup Plugin
 
 
 
 
 
 
 
 
 
19
 
20
  ★ Pretty fade-in and fade-out animation.
21
  ★ Need to remove plugin and save data? It is possible!
35
  Thanks to [Viterbo Marketing](https://www.viterbomarketing.com) for website and marketing consulting.
36
 
37
  WANT MORE FEATURES? Try ITRO Wordpress Marketing for free!
38
+ [TRY IT FOR FREE!](http://www.itroteam.com/download-free-trial-of-itro-wordpress-marketing/)
39
 
40
+ ITRO Popup is a very lightweight Plugin for Wordpress which allow users to add a fully-customizable, multilanguage pop-up thanks to qTranslate-X.
41
+ It has a very user-friendly interface, which allow Wordpress users to easily modify all settings needed for a popup, without coding.
42
+ With "Age restricted site" option, the popup block the navigation (for age validation) until the user declare that is above the local country legal age.
43
+ It is useful for adult content Wordpress site (tobacco & alcohol selling, violence, bad language, etc...). The leave and the enter button
44
+ are separately customizable. Is embedded the Wordpress editor to simplify input whatever you want in your popup.
45
+ Popup can be rendered unlockable with the option "Unlockable popup" so it will close only with countdown.
46
+ This plugin is basic-user oriented, no code knowledge is required.
47
+ Simply the best Wordpress popup plugin!
48
 
49
+ TRANSLATED IN FOLLOWING LANGUAGES:
50
  - Italian
 
51
  - English
 
52
  - French (thanks to Patrice CHASSAING)
 
53
  - Serbo-Croatian (thanks to Andrijana Nikolic www.webhostinggeeks.com)
 
54
  - Nederlands (thanks to Descamps Gino)
55
 
56
+ FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itroteam.com/itro-wordpress-popup-plugin-guide/)
57
+ DONATE NOW! [DONATE NOW](http://www.itroteam.com/donate/)
58
 
59
+ For any problem, please contact us at our site: [CONTACT US](http://www.itroteam.com/contact-us/)
 
 
 
60
 
61
  Want a more powerful marketing tools?
62
  Try ITRO Wordpress Marketing PRO with a 14 days free trial.
74
  ★ SOCIAL POPUPS
75
  ★ VIDEO EMBEDDING (Youtube and Vimeo)
76
 
77
+ [TRY IT FOR FREE!](http://www.itroteam.com/download-free-trial-of-itro-wordpress-marketing/)
78
 
79
  == Installation ==
80
 
81
+ FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itroteam.com/itro-wordpress-popup-plugin-guide/)
82
 
83
+ DONATE NOW! - HELP US TO DEVELOP FOR YOU! [DONATE NOW](http://www.itroteam.com/donate/)
84
 
85
  1. Unzip `itro-plugin.zip` to the `/wp-content/plugins/` directory or select it by "Add new" in the 'Plugins' menu in WordPress
86
  2. Activate the plugin through the 'Plugins' menu in WordPress
87
  3. Go to "Settings->ITRO Popup" in the admin menu
88
+ 4. Enjoy
89
 
90
  == Frequently Asked Questions ==
91
 
92
+ FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itroteam.com/itro-wordpress-popup-plugin-guide/)
93
 
94
+ DONATE NOW! - HELP US TO KEEP IT FREE! [DONATE NOW](http://www.itroteam.com/donate/)
95
 
96
  == Screenshots ==
97
 
98
+ VIEW LIVE DEMOS ON OUR OFFICIAL SITE - [CLICK HERE!](http://www.itroteam.com/wordpress-popup-samples-and-demos/)
99
 
100
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  = 4.8 =
102
  ADDED: Fully responsive design.
103
  ADDED: Absolute position only for mobile devices.
308
  First released version.
309
 
310
  == Upgrade Notice ==
 
 
 
 
 
 
 
 
 
 
 
311
  = 4.8 =
312
  ADDED: Fully responsive design.
313
  ADDED: Absolute position only for mobile devices.
315
  = 4.7.3 =
316
  IMPROVED: Useless preview page deleted. Preview via GET request.
317
 
318
+ = 4.7.2 =
319
+ FIXED: Popup closing by clicking outside with age restriction.
320
+
321
+ = 4.7.1 =
322
+ FIXED: shortcodes not working in the popup contents
323
+
324
+ = 4.7 =
325
+ ADDED: Multilingual compatibility with qtranslate X.
326
+ ADDED: Url for the enter button of age validation.
327
+
328
  == Notes ==
329
+ FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itroteam.com/itro-wordpress-popup-plugin-guide/)
330
 
331
+ DONATE NOW! - HELP US TO KEEP IT FREE! [DONATE NOW](http://www.itroteam.com/donate/)
332
 
333
  We accept all kind of suggestion.
334
  Thanks to Jan Odvarko for jscolor: http://jscolor.com/
scripts/itro-admin-scripts.js CHANGED
@@ -1,7 +1,3 @@
1
- /*
2
- This file is part of ITRO Popup Plugin. (email : support@itroteam.com)
3
- */
4
-
5
  /* -------------- SCRIPTS FOR ADMIN PANNEL */
6
 
7
  function itro_pos(e)
 
 
 
 
1
  /* -------------- SCRIPTS FOR ADMIN PANNEL */
2
 
3
  function itro_pos(e)
scripts/itro-scripts.js CHANGED
@@ -1,25 +1,17 @@
1
- /*
2
- This file is part of ITRO Popup Plugin. (email : support@itroteam.com)
3
- */
4
-
5
  /* init variables */
6
  var itro_is_preview;
7
  var itro_cookie_expiration;
8
  var itro_age_restriction;
9
 
10
- /**
11
- * Manage popup appearing
12
- *
13
- *
14
- * @since 1.0
15
- *
16
- */
17
  function itro_enter_anim()
18
- {
19
  if( document.cookie.indexOf("popup_cookie") == -1 || itro_is_preview === true )
20
  {
21
- itro_margin_refresh(50); //align the popup before fadein
22
-
 
 
23
  jQuery("#itro_opaco").fadeIn(function()
24
  {
25
  jQuery("#itro_popup").fadeIn();
@@ -32,19 +24,9 @@ function itro_enter_anim()
32
 
33
  }
34
 
35
-
36
- /**
37
- * Center the popup vertically
38
- *
39
- * @param int speed: the milesec speed fo the alignment animation
40
- *
41
- * @since 1.0
42
- *
43
- */
44
- function itro_margin_refresh(speed){
45
- if(typeof(speed) == undefined){speed = 200;}
46
-
47
- //if( jQuery('#itro_popup').css('position') )
48
  if( typeof( window.innerWidth ) == 'number' )
49
  {
50
  /* Non-IE */
@@ -61,61 +43,8 @@ function itro_margin_refresh(speed){
61
  browserWidth = document.body.clientWidth;
62
  browserHeight = document.body.clientHeight;
63
  }
64
- popupHeight = document.getElementById('itro_popup').offsetHeight ; //get the px size of popup div
65
- parentOffset = jQuery('#itro_popup').position().top;
66
- docOffset = jQuery('#itro_popup').offset().top;
67
-
68
- desTopWindowMargin = Math.round((browserHeight - popupHeight)/2); //desired top margin of popup (window related)
69
- desTopWindowMargin = desTopWindowMargin < 0 ? 0 : desTopWindowMargin; //avoid that negative top position will hide the popup
70
- popupTopMargin = desTopWindowMargin - docOffset + parentOffset;
71
-
72
- if(jQuery('#itro_popup').css('position') == 'absolute'){
73
- //set a tollerance to avoid flickering
74
- if(Math.abs(popupTopMargin - parentOffset) > 2){
75
- jQuery('#itro_popup').animate({top: popupTopMargin}, speed);
76
- }
77
- }else{
78
- if(Math.abs(popupTopMargin - parentOffset) > 2){
79
- jQuery('#itro_popup').animate({top: desTopWindowMargin}, speed);
80
- }
81
- }
82
-
83
- }
84
-
85
- /**
86
- * Invert an hex color with the # char
87
- *
88
- * @param string hexTripletColor: the hex string
89
- *
90
- * @since 4.9
91
- *
92
- */
93
- function itro_invert_color(hexTripletColor) {
94
- var color = hexTripletColor;
95
- color = color.substring(1); // remove #
96
- color = parseInt(color, 16); // convert to integer
97
- color = 0xFFFFFF ^ color; // invert three bytes
98
- color = color.toString(16); // convert to hex
99
- color = "#" + color; // prepend #
100
- return color;
101
- }
102
-
103
- /**
104
- * Convert an rgb string like rgb(255, 255, 255) to an hex code
105
- *
106
- * @param string rgbString: the rgb string
107
- *
108
- * @since 4.9
109
- *
110
- */
111
- function itro_rgb2hex(rgbString){
112
- var parts = rgbString.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
113
- delete (parts[0]);
114
- for (var i = 1; i <= 3; ++i) {
115
- parts[i] = parseInt(parts[i]).toString(16);
116
- if (parts[i].length == 1) parts[i] = '0' + parts[i];
117
- }
118
- return '#'+parts.join('').toUpperCase();
119
  }
120
 
121
  /* function for countdown to show popup when the delay is set */
@@ -129,13 +58,7 @@ function popup_delay()
129
  }
130
  }
131
 
132
-
133
- /**
134
- * Countdown for automatic closing
135
- *
136
- * @since 1.0
137
- *
138
- */
139
  function popTimer()
140
  {
141
  if (popTime>0)
 
 
 
 
1
  /* init variables */
2
  var itro_is_preview;
3
  var itro_cookie_expiration;
4
  var itro_age_restriction;
5
 
6
+ /* manage fade in animation */
 
 
 
 
 
 
7
  function itro_enter_anim()
8
+ {
9
  if( document.cookie.indexOf("popup_cookie") == -1 || itro_is_preview === true )
10
  {
11
+ itro_popup.style.visibility = '';
12
+ itro_opaco.style.visibility = '';
13
+ itro_popup.style.display = 'none';
14
+ itro_opaco.style.display = 'none';
15
  jQuery("#itro_opaco").fadeIn(function()
16
  {
17
  jQuery("#itro_popup").fadeIn();
24
 
25
  }
26
 
27
+ /* function for automatic top margin refresh, to center the popup vertically */
28
+ function marginRefresh()
29
+ {
 
 
 
 
 
 
 
 
 
 
30
  if( typeof( window.innerWidth ) == 'number' )
31
  {
32
  /* Non-IE */
43
  browserWidth = document.body.clientWidth;
44
  browserHeight = document.body.clientHeight;
45
  }
46
+ popupHeight = document.getElementById('itro_popup').offsetHeight ; /* get the actual px size of popup div */
47
+ document.getElementById('itro_popup').style.top = (browserHeight - popupHeight)/2 + "px"; /* update the top margin of popup */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  }
49
 
50
  /* function for countdown to show popup when the delay is set */
58
  }
59
  }
60
 
61
+ /* countdown for automatic closing */
 
 
 
 
 
 
62
  function popTimer()
63
  {
64
  if (popTime>0)
templates/itro-popup-template.php CHANGED
@@ -1,17 +1,14 @@
1
- <?php
2
- /*
3
- This file is part of ITRO Popup Plugin. (email : support@itroteam.com)
4
- */
5
  function itro_popup_template()
6
  { ?>
7
- <div id="itro_popup" style="display: none">
8
  <?php
9
  if( itro_get_option('age_restriction') == NULL ) /* age restriction off */
10
  {
11
  if( itro_get_option('popup_time') != 0 )
12
  {
13
  echo '<div id="popup_countdown" align="center">';
14
- _e(itro_get_option('countdown_text'));
15
  echo '<b id="timer"></b></div>';
16
  }
17
 
@@ -42,13 +39,11 @@ function itro_popup_template()
42
  }
43
  ?>
44
  </div>
45
- <?php if ( itro_get_option('age_restriction') != 'yes'){ ?>
46
  <div id="ipp_mobile_close_tab">
47
- <span id="ipp_mobile_close_txt" onclick="jQuery('#itro_popup').fadeOut(function(){itro_opaco.style.visibility='hidden';})">CLOSE</span>
48
  </div>
49
- <?php }?>
50
  </div>
51
- <div id="itro_opaco" style="display: none" <?php if ( itro_get_option('age_restriction') != 'yes' && itro_get_option('popup_unlockable') != 'yes' ){ ?> onclick="jQuery('#itro_popup').fadeOut(function(){itro_opaco.style.visibility='hidden';})" <?php } ?> ></div>
52
  <?php
53
  }
54
  ?>
1
+ <?php
 
 
 
2
  function itro_popup_template()
3
  { ?>
4
+ <div id="itro_popup" style="visibility:hidden; display: none;">
5
  <?php
6
  if( itro_get_option('age_restriction') == NULL ) /* age restriction off */
7
  {
8
  if( itro_get_option('popup_time') != 0 )
9
  {
10
  echo '<div id="popup_countdown" align="center">';
11
+ _e('This popup will be closed in: ','itro-plugin');
12
  echo '<b id="timer"></b></div>';
13
  }
14
 
39
  }
40
  ?>
41
  </div>
 
42
  <div id="ipp_mobile_close_tab">
43
+ <span id="ipp_mobile_close_txt">CLOSE</span>
44
  </div>
 
45
  </div>
46
+ <div id="itro_opaco" style="visibility:hidden" <?php if ( itro_get_option('age_restriction') != 'yes' ){ ?> onclick="jQuery('#itro_popup').fadeOut(function(){itro_opaco.style.visibility='hidden';})" <?php } ?> ></div>
47
  <?php
48
  }
49
  ?>