ITRO Popup Plugin - Version 4.3.2

Version Description

Woocommerce compatibility problem fixed (popup not works on shop page).

Download this release

Release Info

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

Code changes from version 4.3.1 to 4.3.2

css/itro-style.php CHANGED
@@ -117,6 +117,7 @@ function itro_style() { ?>
117
  opacity: <?php echo itro_get_option('popup_bg_opacity'); ?> ;
118
  filter:alpha(opacity = <?php echo ( itro_get_option('popup_bg_opacity') * 100); ?>); /* For IE8 and earlier */
119
  }
 
120
  </style>
121
  <?php
122
  }
117
  opacity: <?php echo itro_get_option('popup_bg_opacity'); ?> ;
118
  filter:alpha(opacity = <?php echo ( itro_get_option('popup_bg_opacity') * 100); ?>); /* For IE8 and earlier */
119
  }
120
+
121
  </style>
122
  <?php
123
  }
functions/core-function.php CHANGED
@@ -101,13 +101,35 @@ function itro_init()
101
  //--------------------------DISPLAY THE POPUP
102
  function itro_display_popup()
103
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  //this condition, control if the popup must or not by displayed in a specified page
 
105
  $selected_page_id = json_decode(itro_get_option('selected_page_id'));
106
  $id_match = NULL;
107
  if( isset($selected_page_id) )
108
  {
109
  foreach ($selected_page_id as $single_id)
110
- {if ($single_id==get_the_id()) $id_match++; }
 
 
 
 
 
111
  }
112
  if ( (is_front_page() && itro_get_option('blog_home') == 'yes') || (is_home() && itro_get_option('blog_home') == 'yes') || itro_get_option('preview_id') == get_the_id() ) { $id_match++; }
113
  if( ( itro_get_option('page_selection')!='any' && !isset($_COOKIE['popup_cookie']) ) || itro_get_option('preview_id') == get_the_id())
101
  //--------------------------DISPLAY THE POPUP
102
  function itro_display_popup()
103
  {
104
+ //woocommerce shop page identification
105
+ if( function_exists('is_shop') && function_exists('woocommerce_get_page_id') ) //if this functions exist, woocommerce is installed!
106
+ {
107
+ if ( is_shop() ) // if the actual page is the standard woocommerce shop page
108
+ {
109
+ $woo_shop = true;
110
+ $woo_shop_id = woocommerce_get_page_id( 'shop' );
111
+ }
112
+ }
113
+ else
114
+ {
115
+ $woo_shop = NULL;
116
+ $woo_shop_id = NULL;
117
+ }
118
+
119
+
120
  //this condition, control if the popup must or not by displayed in a specified page
121
+
122
  $selected_page_id = json_decode(itro_get_option('selected_page_id'));
123
  $id_match = NULL;
124
  if( isset($selected_page_id) )
125
  {
126
  foreach ($selected_page_id as $single_id)
127
+ {
128
+ if ( $single_id == get_the_id() || ( $single_id == $woo_shop_id && $woo_shop ) ) //if the selected id is the current page id popup will be displayed OR if the woo_shop_id has been selected and you are in the woocommerce standard shop page ($woo_shop == true), popup will be displayed.
129
+ {
130
+ $id_match++;
131
+ }
132
+ }
133
  }
134
  if ( (is_front_page() && itro_get_option('blog_home') == 'yes') || (is_home() && itro_get_option('blog_home') == 'yes') || itro_get_option('preview_id') == get_the_id() ) { $id_match++; }
135
  if( ( itro_get_option('page_selection')!='any' && !isset($_COOKIE['popup_cookie']) ) || itro_get_option('preview_id') == get_the_id())
functions/index.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ //silence is golden
3
+ ?>
index.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ //silence is golden
3
+ ?>
mc-main.php CHANGED
@@ -8,12 +8,12 @@ Plugin URI: http://www.itro.eu/
8
  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.
9
  Author: I.T.RO.(c) Sez. Informatica
10
  E-mail: support.itro@live.com
11
- Version: 4.3.1
12
  Author URI: http://www.itro.eu/
13
  */
14
 
15
  global $ITRO_VER;
16
- $ITRO_VER = 4.31;
17
  define('itroLocalPath', __DIR__);
18
  define('itroPath', plugins_url() . '/itro-popup/');
19
  define('itroImages', plugins_url() . '/itro-popup/images/');
@@ -46,9 +46,17 @@ function itro_load_script()
46
  wp_enqueue_script('jquery');
47
  }
48
 
 
 
 
 
 
 
 
49
  add_action( 'wp_footer','itro_display_popup');
50
  add_action( 'wp_enqueue_scripts' , 'itro_load_script' );
51
 
 
52
  add_action('admin_head', 'itro_admin_js');
53
  add_action('admin_print_scripts', 'itro_admin_scripts');
54
  add_action('admin_print_styles', 'itro_load_admin_styles');
8
  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.
9
  Author: I.T.RO.(c) Sez. Informatica
10
  E-mail: support.itro@live.com
11
+ Version: 4.3.2
12
  Author URI: http://www.itro.eu/
13
  */
14
 
15
  global $ITRO_VER;
16
+ $ITRO_VER = 4.32;
17
  define('itroLocalPath', __DIR__);
18
  define('itroPath', plugins_url() . '/itro-popup/');
19
  define('itroImages', plugins_url() . '/itro-popup/images/');
46
  wp_enqueue_script('jquery');
47
  }
48
 
49
+ function itro_get_woo_shop_id()
50
+ {
51
+ itro_update_option('woo_shop_id', get_the_id());
52
+ }
53
+
54
+ add_action( 'woocommerce_before_shop_loop' , 'itro_get_woo_shop_id' );
55
+
56
  add_action( 'wp_footer','itro_display_popup');
57
  add_action( 'wp_enqueue_scripts' , 'itro_load_script' );
58
 
59
+
60
  add_action('admin_head', 'itro_admin_js');
61
  add_action('admin_print_scripts', 'itro_admin_scripts');
62
  add_action('admin_print_styles', 'itro_load_admin_styles');
readme.txt CHANGED
@@ -1,20 +1,37 @@
1
- === ITRO Popup Plugin ===
2
  Contributors: ITRO
3
  Donate link: http://www.itro.eu/index.php/donate/
4
  Tags: popup, age restriction, block, violence, age validation, adult, adult content, content warning, wp editor, fancy box, fancy popup, custom popup, advertising popup, ads, ads popup, pop-up, lightbox, lightbox popup,
5
  Requires at least: 3.0.1
6
  Tested up to: 3.5.1
7
- Stable tag: 4.3.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:
12
- * Age validation for adult-content site
13
- * Fully customizable with WP Post Editor
14
- * Very easy to use
15
 
16
  == Description ==
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  ITRO Popup is a very lightweight Plugin for Wordpress which allow users to add a fully-customizable and perfectly centered popup.
19
  It has a very user-friendly interface, which allow Wordpress users to easily modify all settings needed for a popup, without coding.
20
  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.
@@ -28,23 +45,6 @@ FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itro.eu/?p
28
 
29
  DONATE NOW! - HELP US TO DEVELOP FOR YOU! [DONATE NOW](http://www.itro.eu/?page_id=396)
30
 
31
- FEATURES
32
-
33
- * Pretty fade-in and fade-out animation.
34
- * Need to remove plugin and save data? It is possible!
35
- * Selcted pages where you want to display the popup, by a scrollable list. NO SHORTCODES NEEDED!
36
- * Fully translated in Italian. Ready for multilingual translation.
37
- * Close popup with ESC button (not with "age restricted option" checked).
38
- * Automatic popup centering in browser page.
39
- * Fully and easy customizable aspect (background, border, color, etc...).
40
- * Settable countdown for automatic closing.
41
- * Settable coockie expiration time for the next popup visualization.
42
- * Age validation for adult-content site.
43
- * Custom text to display whatever you want with WP editor.
44
- * All great explaned by tips in admin pannel.
45
- * Great and fast support for all your problem with our popup plugin.
46
- * All in a very easy way to use!
47
-
48
  Any suggestions for new features implementation which you need?
49
  Need something for your interest or your business?
50
  Email to support.itro@live.com
@@ -75,6 +75,9 @@ DONATE NOW! - HELP US TO DEVELOP FOR YOU! [DONATE NOW](http://www.itro.eu/?page_
75
  no screenshot avaliable
76
 
77
  == Changelog ==
 
 
 
78
  = 4.3.1 =
79
  Improved database function compatibility and speed. (Error in IIS servers)
80
 
@@ -199,7 +202,7 @@ bug fixed: color table now works in admin pannel.
199
  First released version.
200
 
201
  == Upgrade Notice ==
202
- Improved database function compatibility and speed. (Error in IIS servers)
203
 
204
  == Notes ==
205
  FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itro.eu/?page_id=390)
@@ -211,16 +214,16 @@ Thanks to Jan Odvarko for jscolor: http://jscolor.com/
211
 
212
  == Features ==
213
 
214
- * Pretty fade-in and fade-out animation.
215
- * Need to remove plugin and save data? It is possible!
216
- * Can be multiple selcted pages where user want to display the popup. NO SHORTCODES NEEDED!
217
- * Fully translated in Italian. Ready for multilingual translation.
218
- * Close popup with ESC button (not when "age restricted option" is checked).
219
- * Perfectly centered popup, also with resized windows.
220
- * Fully and easy customizable aspect (background, border, color, etc...).
221
- * Settable countdown for automatic closing.
222
- * Settable coockie expiration time for the next popup visualization.
223
- * Add age validation for adult-content site.
224
- * Custom text to display whatever you want with WP editor.
225
- * All great explaned by tips in admin pannel.
226
- * All in a very easy way to use!
1
+ === ITRO Popup Plugin ===
2
  Contributors: ITRO
3
  Donate link: http://www.itro.eu/index.php/donate/
4
  Tags: popup, age restriction, block, violence, age validation, adult, adult content, content warning, wp editor, fancy box, fancy popup, custom popup, advertising popup, ads, ads popup, pop-up, lightbox, lightbox popup,
5
  Requires at least: 3.0.1
6
  Tested up to: 3.5.1
7
+ Stable tag: 4.3.2
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 validation for adult-content site
13
+ Fully customizable with WP Post Editor
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!
22
+ ★ Selcted pages where you want to display the popup, by a scrollable list. NO SHORTCODES NEEDED!
23
+ ★ Fully translated in Italian. Ready for multilingual translation.
24
+ ★ Close popup with ESC button (not with "age restricted option" checked).
25
+ ★ Automatic popup centering in browser page.
26
+ ★ Fully and easy customizable aspect (background, border, color, etc...).
27
+ ★ Settable countdown for automatic closing.
28
+ ★ Settable coockie expiration time for the next popup visualization.
29
+ ★ Age validation for adult-content site.
30
+ ★ Custom text to display whatever you want with WP editor.
31
+ ★ All great explaned by tips in admin pannel.
32
+ ★ Great and fast support for all your problem with our popup plugin.
33
+ ★ All in a very easy way to use!
34
+
35
  ITRO Popup is a very lightweight Plugin for Wordpress which allow users to add a fully-customizable and perfectly centered popup.
36
  It has a very user-friendly interface, which allow Wordpress users to easily modify all settings needed for a popup, without coding.
37
  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.
45
 
46
  DONATE NOW! - HELP US TO DEVELOP FOR YOU! [DONATE NOW](http://www.itro.eu/?page_id=396)
47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  Any suggestions for new features implementation which you need?
49
  Need something for your interest or your business?
50
  Email to support.itro@live.com
75
  no screenshot avaliable
76
 
77
  == Changelog ==
78
+ = 4.3.2 =
79
+ Woocommerce compatibility problem fixed (popup not works on shop page).
80
+
81
  = 4.3.1 =
82
  Improved database function compatibility and speed. (Error in IIS servers)
83
 
202
  First released version.
203
 
204
  == Upgrade Notice ==
205
+ Woocommerce compatibility problem fixed (popup not works on shop page).
206
 
207
  == Notes ==
208
  FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itro.eu/?page_id=390)
214
 
215
  == Features ==
216
 
217
+ Pretty fade-in and fade-out animation.
218
+ Need to remove plugin and save data? It is possible!
219
+ Can be multiple selcted pages where user want to display the popup. NO SHORTCODES NEEDED!
220
+ Fully translated in Italian. Ready for multilingual translation.
221
+ Close popup with ESC button (not when "age restricted option" is checked).
222
+ Perfectly centered popup, also with resized windows.
223
+ Fully and easy customizable aspect (background, border, color, etc...).
224
+ Settable countdown for automatic closing.
225
+ Settable coockie expiration time for the next popup visualization.
226
+ Add age validation for adult-content site.
227
+ Custom text to display whatever you want with WP editor.
228
+ All great explaned by tips in admin pannel.
229
+ All in a very easy way to use!
templates/itro-popup-template.php CHANGED
@@ -8,8 +8,8 @@ function itro_popup_template()
8
  if ( itro_get_option('age_restriction') == 'yes' )
9
  {?>
10
  <p id="age_button_area" align="center">
11
- <input type="button" id="ageEnterButton" onClick="itro_set_cookie('popup_cookie','one_time_popup',<?php echo itro_get_option('cookie_time_exp'); ?>); jQuery('#itro_popup').fadeOut(function(){itro_opaco.style.visibility='hidden';})" value="<?php echo itro_get_option('enter_button_text');?>">
12
- <input type="button" id="ageLeaveButton" onClick="javascript:window.open('<?php echo itro_get_option('leave_button_url')?>','_self');" value="<?php echo itro_get_option('leave_button_text');?>">
13
  </p><?php
14
  }
15
  ?>
8
  if ( itro_get_option('age_restriction') == 'yes' )
9
  {?>
10
  <p id="age_button_area" align="center">
11
+ <input type="button" id="ageEnterButton" onClick="itro_set_cookie('popup_cookie','one_time_popup',<?php echo itro_get_option('cookie_time_exp'); ?>); jQuery('#itro_popup').fadeOut(function(){itro_opaco.style.visibility='hidden';})" value="<?php echo itro_get_option('enter_button_text');?>">
12
+ <input type="button" id="ageLeaveButton" onClick="javascript:window.open('<?php echo itro_get_option('leave_button_url')?>','_self');" value="<?php echo itro_get_option('leave_button_text');?>">
13
  </p><?php
14
  }
15
  ?>