Version Description
FIXED: automatic top margin not working with popup delay ADDED: close cross can be a custom image IMPROVED: cleaned the js script in itro-admin-scripts.js IMPROVED: admin pannel aspect and options order IMPROVED: plugin version check for DB updates
Download this release
Release Info
Developer | ITRO |
Plugin | ITRO Popup Plugin |
Version | 5.0 |
Comparing to | |
See all releases |
Code changes from version 4.9.9 to 5.0
- admin/popup-admin.php +46 -38
- css/itro-admin-style.css +9 -2
- css/itro-style-functions.php +1 -3
- functions/core-function.php +2 -1
- functions/database-function.php +7 -5
- functions/js-function.php +3 -3
- images/5_stars.png +0 -0
- mc-main.php +2 -2
- readme.txt +17 -3
- scripts/itro-admin-scripts.js +6 -3
- scripts/itro-scripts.js +2 -2
- templates/itro-popup-template.php +6 -5
admin/popup-admin.php
CHANGED
@@ -50,7 +50,8 @@ if( !isset($submitted_form ))
|
|
50 |
/*opt 33*/'cross_selected',
|
51 |
/*opt 34*/'enter_button_url',
|
52 |
/*opt 35*/'absolute_mobile_pos',
|
53 |
-
/*opt 36*/'countdown_text'
|
|
|
54 |
);
|
55 |
|
56 |
$submitted_form = 'mt_submit_hidden';
|
@@ -310,16 +311,6 @@ if( isset($_POST[ $submitted_form ]) && $_POST[ $submitted_form ] == 'Y' || isse
|
|
310 |
<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">
|
311 |
</div>
|
312 |
|
313 |
-
<!-- background image !-->
|
314 |
-
<p><?php _e("BACKGROUND IMAGE",'itro-plugin');?></p>
|
315 |
-
<a href="<?php if ( itro_get_option('background_source') == NULL ) {echo '#';} else { echo itro_get_option('background_source'); }?>"><?php _e('Show image','itro-plugin')?></a>
|
316 |
-
|
317 |
-
<input type="radio" name="<?php echo $opt_name[22];?>" value="" <?php if($opt_val[22]== 'no' || $opt_val[22] == NULL ){echo 'checked="checked"';} ?>/>
|
318 |
-
<?php _e("No background",'itro-plugin');?><br>
|
319 |
-
<input type="radio" id="yes_bg" name="<?php echo $opt_name[22];?>" value="yes" <?php if( $opt_val[22]== 'yes' ){echo 'checked="checked"';} ?>/>
|
320 |
-
<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'); ?>" />
|
321 |
-
<input class="button" id="upload_button" type="button" name="bg_upload_button" value="<?php _e('Upload Image','itro-plugin') ?>" />
|
322 |
-
|
323 |
<!-- popup position !-->
|
324 |
<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');?>" >
|
325 |
<select name="<?php echo $opt_name[16]; ?>" style="min-width:100px;">
|
@@ -328,27 +319,37 @@ if( isset($_POST[ $submitted_form ]) && $_POST[ $submitted_form ] == 'Y' || isse
|
|
328 |
</select>
|
329 |
</p>
|
330 |
|
331 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
<div id="<?php echo $opt_name[30]; ?>_div">
|
333 |
-
<
|
334 |
-
<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"';} ?> />
|
335 |
-
<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>
|
336 |
-
<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');?>" >
|
337 |
-
</p>
|
338 |
-
|
339 |
-
<!-- popup top margin !-->
|
340 |
-
<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;" >
|
341 |
-
<span style="float:left;" ><?php _e("Popup top margin(px):", 'itro-plugin' ); ?></span>
|
342 |
-
|
343 |
-
<?php itro_slidebar( $opt_name[1] , $opt_val[1] , 0 , 750 , 5, 0, '') ?>
|
344 |
-
<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">
|
345 |
-
</div>
|
346 |
-
<?php echo itro_show_hide(array('top_margin_slider'), $opt_name[30], 'table',false, array('yellow',300)); ?>
|
347 |
-
|
348 |
-
|
349 |
<!-- background opacity !-->
|
350 |
<div style="display:table; height:10px; padding-bottom:5px;">
|
351 |
-
<span style="float:left;" ><?php _e("
|
352 |
|
353 |
<?php itro_slidebar( $opt_name[25] , $opt_val[25] , 0 , 1 , 0.05 , 2 , '' ) ?>
|
354 |
<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">
|
@@ -369,17 +370,27 @@ if( isset($_POST[ $submitted_form ]) && $_POST[ $submitted_form ] == 'Y' || isse
|
|
369 |
</script
|
370 |
|
371 |
<!-- opaco color !-->
|
372 |
-
<p><?php _e("
|
373 |
<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">
|
374 |
</p>
|
375 |
|
|
|
376 |
<!-- close cross selection !-->
|
377 |
-
<p><?php _e("
|
378 |
<select name="<?php echo $opt_name[33]; ?>" style="min-width:100px;">
|
379 |
<option value="black" <?php if(itro_get_option($opt_name[33])=='black') {echo 'selected="select"';} ?> ><?php _e("Black", 'itro-plugin' ); ?></option>
|
380 |
<option value="white" <?php if(itro_get_option($opt_name[33])=='white') {echo 'selected="select"';} ?> ><?php _e("White", 'itro-plugin' ); ?></option>
|
381 |
<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>
|
|
|
382 |
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
383 |
</p>
|
384 |
|
385 |
<!-- RESPONSIVE SETTINGS -->
|
@@ -483,13 +494,10 @@ if( isset($_POST[ $submitted_form ]) && $_POST[ $submitted_form ] == 'Y' || isse
|
|
483 |
</form>
|
484 |
<div id="rightColumn2">
|
485 |
<div id="donateForm">
|
486 |
-
<h3><?php _e("Like it?
|
487 |
-
<
|
488 |
-
|
489 |
-
|
490 |
-
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"/>
|
491 |
-
<img alt="" border="0" src="https://www.paypalobjects.com/it_IT/i/scr/pixel.gif" width="1" height="1"/>
|
492 |
-
</form>
|
493 |
</div>
|
494 |
<p class="wpstyle" onClick="jQuery('#debug_info').toggle();"><?php _e("System Status", 'itro-plugin' ); ?> </p>
|
495 |
<div method="POST" action="" id="debug_info" style="display:none;">
|
50 |
/*opt 33*/'cross_selected',
|
51 |
/*opt 34*/'enter_button_url',
|
52 |
/*opt 35*/'absolute_mobile_pos',
|
53 |
+
/*opt 36*/'countdown_text',
|
54 |
+
/*opt 37*/'close_cross_url'
|
55 |
);
|
56 |
|
57 |
$submitted_form = 'mt_submit_hidden';
|
311 |
<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">
|
312 |
</div>
|
313 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
314 |
<!-- popup position !-->
|
315 |
<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');?>" >
|
316 |
<select name="<?php echo $opt_name[16]; ?>" style="min-width:100px;">
|
319 |
</select>
|
320 |
</p>
|
321 |
|
322 |
+
<h4><?php _e("TOP MARGIN",'itro-plugin');?></h4>
|
323 |
+
<p>
|
324 |
+
<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"';} ?> />
|
325 |
+
<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>
|
326 |
+
<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');?>" >
|
327 |
+
</p>
|
328 |
+
|
329 |
+
<!-- popup top margin !-->
|
330 |
+
<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;" >
|
331 |
+
<span style="float:left;" ><?php _e("Popup top margin(px):", 'itro-plugin' ); ?></span>
|
332 |
+
|
333 |
+
<?php itro_slidebar( $opt_name[1] , $opt_val[1] , 0 , 750 , 5, 0, '') ?>
|
334 |
+
<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">
|
335 |
+
</div>
|
336 |
+
<?php echo itro_show_hide(array('top_margin_slider'), $opt_name[30], 'table',false, array('yellow',300)); ?>
|
337 |
+
|
338 |
+
<h4><?php _e("BACKGROUND IMAGE",'itro-plugin');?></h4>
|
339 |
+
<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>
|
340 |
+
|
341 |
+
<input type="radio" name="<?php echo $opt_name[22];?>" value="" <?php if($opt_val[22]== 'no' || $opt_val[22] == NULL ){echo 'checked="checked"';} ?>/>
|
342 |
+
<?php _e("No background",'itro-plugin');?><br>
|
343 |
+
<input type="radio" id="yes_bg" name="<?php echo $opt_name[22];?>" value="yes" <?php if( $opt_val[22]== 'yes' ){echo 'checked="checked"';} ?>/>
|
344 |
+
<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'); ?>" />
|
345 |
+
<input class="button ipp_upload_button" type="button" name="bg_upload_button" value="<?php _e('Upload Image','itro-plugin') ?>" />
|
346 |
+
|
347 |
+
|
348 |
<div id="<?php echo $opt_name[30]; ?>_div">
|
349 |
+
<h4><?php _e("OPAQUE LAYER",'itro-plugin');?></h4>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
<!-- background opacity !-->
|
351 |
<div style="display:table; height:10px; padding-bottom:5px;">
|
352 |
+
<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>
|
353 |
|
354 |
<?php itro_slidebar( $opt_name[25] , $opt_val[25] , 0 , 1 , 0.05 , 2 , '' ) ?>
|
355 |
<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">
|
370 |
</script
|
371 |
|
372 |
<!-- opaco color !-->
|
373 |
+
<p><?php _e("Layer color", 'itro-plugin' ); ?>
|
374 |
<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">
|
375 |
</p>
|
376 |
|
377 |
+
<h4><?php _e("CLOSE CROSS",'itro-plugin');?></h4>
|
378 |
<!-- close cross selection !-->
|
379 |
+
<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');?>" >
|
380 |
<select name="<?php echo $opt_name[33]; ?>" style="min-width:100px;">
|
381 |
<option value="black" <?php if(itro_get_option($opt_name[33])=='black') {echo 'selected="select"';} ?> ><?php _e("Black", 'itro-plugin' ); ?></option>
|
382 |
<option value="white" <?php if(itro_get_option($opt_name[33])=='white') {echo 'selected="select"';} ?> ><?php _e("White", 'itro-plugin' ); ?></option>
|
383 |
<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>
|
384 |
+
<option value="url" <?php if(itro_get_option($opt_name[33])=='url') {echo 'selected="select"';} ?> ><?php _e("Custom URL", 'itro-plugin' ); ?></option>
|
385 |
</select>
|
386 |
+
<!-- background image !-->
|
387 |
+
<p>
|
388 |
+
<?php _e("Image custom URL",'itro-plugin');?>
|
389 |
+
<a href="<?php if ( $opt_val[37] == NULL ) {echo 'javascript:void(0)';} else { echo $opt_val[37]; }?>"><?php _e('Show image','itro-plugin')?></a>
|
390 |
+
<input class="upload" onClick="select();" type="text" name="<?php echo $opt_name[37]; ?>" size="50" value="<?php echo $opt_val[37]; ?>" />
|
391 |
+
<input class="button ipp_upload_button" type="button" name="close_img_upload" value="<?php _e('Upload Image','itro-plugin') ?>" />
|
392 |
+
</p>
|
393 |
+
<?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' );?>
|
394 |
</p>
|
395 |
|
396 |
<!-- RESPONSIVE SETTINGS -->
|
494 |
</form>
|
495 |
<div id="rightColumn2">
|
496 |
<div id="donateForm">
|
497 |
+
<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>
|
498 |
+
<p>
|
499 |
+
<?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");?>
|
500 |
+
</p>
|
|
|
|
|
|
|
501 |
</div>
|
502 |
<p class="wpstyle" onClick="jQuery('#debug_info').toggle();"><?php _e("System Status", 'itro-plugin' ); ?> </p>
|
503 |
<div method="POST" action="" id="debug_info" style="display:none;">
|
css/itro-admin-style.css
CHANGED
@@ -59,6 +59,13 @@ This file is part of ITRO Popup Plugin. (email : support@itroteam.com)
|
|
59 |
overflow: show;
|
60 |
}
|
61 |
|
62 |
-
#
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
}
|
59 |
overflow: show;
|
60 |
}
|
61 |
|
62 |
+
#stars_review_img{
|
63 |
+
-webkit-transition: height 0.5s; /* Safari */
|
64 |
+
transition: height 0.5s;
|
65 |
+
width: 150px;
|
66 |
+
height: 35px;
|
67 |
+
vertical-align: middle;
|
68 |
+
}
|
69 |
+
#stars_review_img:hover{
|
70 |
+
height: 70px;
|
71 |
}
|
css/itro-style-functions.php
CHANGED
@@ -194,8 +194,7 @@ function itro_style() {
|
|
194 |
|
195 |
<?php
|
196 |
|
197 |
-
if( itro_get_option('disable_mobile') == 'yes' )
|
198 |
-
{
|
199 |
echo '
|
200 |
@media screen and (max-width: 1024px)
|
201 |
{
|
@@ -203,7 +202,6 @@ function itro_style() {
|
|
203 |
#itro_opaco{display: none !important;}
|
204 |
}';
|
205 |
}
|
206 |
-
|
207 |
?>
|
208 |
</style>
|
209 |
<?php
|
194 |
|
195 |
<?php
|
196 |
|
197 |
+
if( itro_get_option('disable_mobile') == 'yes' ){
|
|
|
198 |
echo '
|
199 |
@media screen and (max-width: 1024px)
|
200 |
{
|
202 |
#itro_opaco{display: none !important;}
|
203 |
}';
|
204 |
}
|
|
|
205 |
?>
|
206 |
</style>
|
207 |
<?php
|
functions/core-function.php
CHANGED
@@ -219,6 +219,7 @@ function ipp_validate_data($data_name, $data){
|
|
219 |
case 'enter_button_url':
|
220 |
case 'leave_button_url':
|
221 |
case 'background_source':
|
|
|
222 |
$data = esc_url_raw($data);
|
223 |
break;
|
224 |
case 'auto_margin_check':
|
@@ -266,7 +267,7 @@ function ipp_validate_data($data_name, $data){
|
|
266 |
}
|
267 |
break;
|
268 |
case 'cross_selected':
|
269 |
-
if(!in_array($data, array('white','black','white_border'))){
|
270 |
$data = 'black';
|
271 |
}
|
272 |
break;
|
219 |
case 'enter_button_url':
|
220 |
case 'leave_button_url':
|
221 |
case 'background_source':
|
222 |
+
case 'close_cross_url':
|
223 |
$data = esc_url_raw($data);
|
224 |
break;
|
225 |
case 'auto_margin_check':
|
267 |
}
|
268 |
break;
|
269 |
case 'cross_selected':
|
270 |
+
if(!in_array($data, array('white','black','white_border','url'))){
|
271 |
$data = 'black';
|
272 |
}
|
273 |
break;
|
functions/database-function.php
CHANGED
@@ -41,19 +41,21 @@ function itro_db_init()
|
|
41 |
function itro_update_db()
|
42 |
{
|
43 |
global $wpdb;
|
44 |
-
|
|
|
|
|
45 |
{
|
46 |
itro_update_option('popup_border_width',3);
|
47 |
itro_update_option('popup_border_radius',8);
|
48 |
}
|
49 |
|
50 |
-
if(
|
51 |
{
|
52 |
$wpdb->query("RENAME TABLE wp_itro_plugin_option TO ". $wpdb->prefix ."itro_plugin_option");
|
53 |
$wpdb->query("RENAME TABLE wp_itro_plugin_field TO ". $wpdb->prefix ."itro_plugin_field");
|
54 |
}
|
55 |
|
56 |
-
if(
|
57 |
{
|
58 |
/* delete the obsolete and useless preview post */
|
59 |
if(itro_get_option('preview_id') != NULL){
|
@@ -61,12 +63,12 @@ function itro_update_db()
|
|
61 |
}
|
62 |
}
|
63 |
// added the text for countdown
|
64 |
-
if(
|
65 |
{
|
66 |
itro_update_option('countdown_text', 'This popup will close in:');
|
67 |
}
|
68 |
// reset the popup height after error for data sanitization
|
69 |
-
if(
|
70 |
{
|
71 |
if(itro_get_option('select_popup_height') == 'px' && itro_get_option('px_popup_height') == 0 ){
|
72 |
itro_update_option('select_popup_height', 'auto');
|
41 |
function itro_update_db()
|
42 |
{
|
43 |
global $wpdb;
|
44 |
+
$prev_ver = get_option('itro_prev_ver');
|
45 |
+
|
46 |
+
if ( $prev_ver <= 3.68 )
|
47 |
{
|
48 |
itro_update_option('popup_border_width',3);
|
49 |
itro_update_option('popup_border_radius',8);
|
50 |
}
|
51 |
|
52 |
+
if( version_compare($prev_ver, 4.6) == -1 && $wpdb->prefix != 'wp_' )
|
53 |
{
|
54 |
$wpdb->query("RENAME TABLE wp_itro_plugin_option TO ". $wpdb->prefix ."itro_plugin_option");
|
55 |
$wpdb->query("RENAME TABLE wp_itro_plugin_field TO ". $wpdb->prefix ."itro_plugin_field");
|
56 |
}
|
57 |
|
58 |
+
if( version_compare($prev_ver, 4.7 ) == -1 )
|
59 |
{
|
60 |
/* delete the obsolete and useless preview post */
|
61 |
if(itro_get_option('preview_id') != NULL){
|
63 |
}
|
64 |
}
|
65 |
// added the text for countdown
|
66 |
+
if( version_compare($prev_ver, 4.91 ) == -1 )
|
67 |
{
|
68 |
itro_update_option('countdown_text', 'This popup will close in:');
|
69 |
}
|
70 |
// reset the popup height after error for data sanitization
|
71 |
+
if( version_compare($prev_ver, 4.95) == -1 )
|
72 |
{
|
73 |
if(itro_get_option('select_popup_height') == 'px' && itro_get_option('px_popup_height') == 0 ){
|
74 |
itro_update_option('select_popup_height', 'auto');
|
functions/js-function.php
CHANGED
@@ -42,7 +42,7 @@ function itro_popup_js()
|
|
42 |
if( itro_get_option('popup_delay') != 0 ) /* if is set the delay */
|
43 |
{ ?>
|
44 |
var delay = <?php echo itro_get_option('popup_delay') . '+' . '1'; ?> ;
|
45 |
-
interval_id_delay = setInterval(function(){popup_delay();},1000);
|
46 |
<?php
|
47 |
}
|
48 |
else /* if popup delay is not setted */
|
@@ -64,7 +64,7 @@ function itro_popup_js()
|
|
64 |
echo itro_get_option('popup_time');
|
65 |
}
|
66 |
?>;
|
67 |
-
interval_id = setInterval(function(){popTimer()},1000); /* the countdown */
|
68 |
<?php
|
69 |
}
|
70 |
}
|
@@ -73,7 +73,7 @@ function itro_popup_js()
|
|
73 |
if( itro_get_option('popup_delay') != 0 )
|
74 |
{ ?>
|
75 |
var delay = <?php echo itro_get_option('popup_delay') . '+' . '1'; ?> ;
|
76 |
-
interval_id_delay = setInterval(function(){popup_delay();},1000);
|
77 |
<?php
|
78 |
}
|
79 |
else
|
42 |
if( itro_get_option('popup_delay') != 0 ) /* if is set the delay */
|
43 |
{ ?>
|
44 |
var delay = <?php echo itro_get_option('popup_delay') . '+' . '1'; ?> ;
|
45 |
+
interval_id_delay = setInterval(function(){popup_delay(auto_margin);},1000);
|
46 |
<?php
|
47 |
}
|
48 |
else /* if popup delay is not setted */
|
64 |
echo itro_get_option('popup_time');
|
65 |
}
|
66 |
?>;
|
67 |
+
interval_id = setInterval(function(){popTimer();},1000); /* the countdown */
|
68 |
<?php
|
69 |
}
|
70 |
}
|
73 |
if( itro_get_option('popup_delay') != 0 )
|
74 |
{ ?>
|
75 |
var delay = <?php echo itro_get_option('popup_delay') . '+' . '1'; ?> ;
|
76 |
+
interval_id_delay = setInterval(function(){popup_delay(auto_margin);},1000);
|
77 |
<?php
|
78 |
}
|
79 |
else
|
images/5_stars.png
ADDED
Binary file
|
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:
|
10 |
Author URI: http://www.itroteam.com
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
14 |
|
15 |
global $ITRO_VER;
|
16 |
-
$ITRO_VER =
|
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.0
|
10 |
Author URI: http://www.itroteam.com
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
14 |
|
15 |
global $ITRO_VER;
|
16 |
+
$ITRO_VER = '5.0';
|
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,10 +1,10 @@
|
|
1 |
=== ITRO Popup Plugin ===
|
2 |
Contributors: ITRO
|
3 |
-
Donate link:
|
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.
|
7 |
-
Stable tag:
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -131,6 +131,13 @@ LIVE DEMOS - [CLICK HERE!](https://www.itroteam.com/wordpress-popup-samples-demo
|
|
131 |
BACKEND SCREENSHOT - [CLICK HERE!](https://www.itroteam.com/wordpress-popup-samples-demos/#backend)
|
132 |
|
133 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
= 4.9.9 =
|
135 |
FIXED: pragraph broken by a useless css directive
|
136 |
FIXED: embedded player (youtube, etc...) continue playing after popup close
|
@@ -386,6 +393,13 @@ bug fixed: color table now works in admin pannel.
|
|
386 |
First released version.
|
387 |
|
388 |
== Upgrade Notice ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
389 |
= 4.9.9 =
|
390 |
FIXED: pragraph broken by a useless css directive
|
391 |
FIXED: embedded player (youtube, etc...) continue playing after popup close
|
1 |
=== ITRO Popup Plugin ===
|
2 |
Contributors: ITRO
|
3 |
+
Donate link: https://www.itroteam.com/leave-a-review/
|
4 |
Tags: multilingual popup, popup, popup message, popuup optin, popup box, popup ads, popup advertising, popup block, popup content warning, fancy box, fancy popup, advertising popup, pop-up, lightbox popup
|
5 |
Requires at least: 3.0.1
|
6 |
+
Tested up to: 4.6.1
|
7 |
+
Stable tag: 5.0
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
131 |
BACKEND SCREENSHOT - [CLICK HERE!](https://www.itroteam.com/wordpress-popup-samples-demos/#backend)
|
132 |
|
133 |
== Changelog ==
|
134 |
+
= 5.0 =
|
135 |
+
FIXED: automatic top margin not working with popup delay
|
136 |
+
ADDED: close cross can be a custom image
|
137 |
+
IMPROVED: cleaned the js script in itro-admin-scripts.js
|
138 |
+
IMPROVED: admin pannel aspect and options order
|
139 |
+
IMPROVED: plugin version check for DB updates
|
140 |
+
|
141 |
= 4.9.9 =
|
142 |
FIXED: pragraph broken by a useless css directive
|
143 |
FIXED: embedded player (youtube, etc...) continue playing after popup close
|
393 |
First released version.
|
394 |
|
395 |
== Upgrade Notice ==
|
396 |
+
= 5.0 =
|
397 |
+
FIXED: automatic top margin not working with popup delay
|
398 |
+
ADDED: close cross can be a custom image
|
399 |
+
IMPROVED: cleaned the js script in itro-admin-scripts.js
|
400 |
+
IMPROVED: admin pannel aspect and options order
|
401 |
+
IMPROVED: plugin version check for DB updates
|
402 |
+
|
403 |
= 4.9.9 =
|
404 |
FIXED: pragraph broken by a useless css directive
|
405 |
FIXED: embedded player (youtube, etc...) continue playing after popup close
|
scripts/itro-admin-scripts.js
CHANGED
@@ -33,10 +33,10 @@ jQuery(document).ready(function()
|
|
33 |
var orig_send_to_editor = window.send_to_editor;
|
34 |
var uploadID = ''; /*setup the var in a global scope*/
|
35 |
|
36 |
-
jQuery('
|
37 |
{
|
|
|
38 |
uploadID = jQuery(this).prev('input'); /*set the uploadID variable to the value of the input before the upload button*/
|
39 |
-
formfield = jQuery('.upload').attr('name');
|
40 |
tb_show('', 'media-upload.php?type=image&amp;amp;TB_iframe=true');
|
41 |
|
42 |
/* restore send_to_editor() when tb closed */
|
@@ -50,7 +50,10 @@ jQuery(document).ready(function()
|
|
50 |
{
|
51 |
imgurl = jQuery('img',html).attr('src');
|
52 |
uploadID.val(imgurl); /*assign the value of the image src to the input*/
|
53 |
-
|
|
|
|
|
|
|
54 |
tb_remove();
|
55 |
};
|
56 |
return false;
|
33 |
var orig_send_to_editor = window.send_to_editor;
|
34 |
var uploadID = ''; /*setup the var in a global scope*/
|
35 |
|
36 |
+
jQuery('.ipp_upload_button').click(function()
|
37 |
{
|
38 |
+
upload_button = jQuery(this);
|
39 |
uploadID = jQuery(this).prev('input'); /*set the uploadID variable to the value of the input before the upload button*/
|
|
|
40 |
tb_show('', 'media-upload.php?type=image&amp;amp;TB_iframe=true');
|
41 |
|
42 |
/* restore send_to_editor() when tb closed */
|
50 |
{
|
51 |
imgurl = jQuery('img',html).attr('src');
|
52 |
uploadID.val(imgurl); /*assign the value of the image src to the input*/
|
53 |
+
//check the radio button if it is the background source
|
54 |
+
if(upload_button.attr('name') == 'bg_upload_button'){
|
55 |
+
jQuery('#yes_bg').prop("checked", true);
|
56 |
+
}
|
57 |
tb_remove();
|
58 |
};
|
59 |
return false;
|
scripts/itro-scripts.js
CHANGED
@@ -144,12 +144,12 @@ function itro_rgb2hex(rgbString){
|
|
144 |
}
|
145 |
|
146 |
/* function for countdown to show popup when the delay is set */
|
147 |
-
function popup_delay(){
|
148 |
delay--;
|
149 |
if(delay <= 0)
|
150 |
{
|
151 |
clearInterval(interval_id_delay);
|
152 |
-
itro_enter_anim();
|
153 |
}
|
154 |
}
|
155 |
|
144 |
}
|
145 |
|
146 |
/* function for countdown to show popup when the delay is set */
|
147 |
+
function popup_delay(auto_margin){
|
148 |
delay--;
|
149 |
if(delay <= 0)
|
150 |
{
|
151 |
clearInterval(interval_id_delay);
|
152 |
+
itro_enter_anim(auto_margin);
|
153 |
}
|
154 |
}
|
155 |
|
templates/itro-popup-template.php
CHANGED
@@ -23,14 +23,15 @@ function itro_popup_template()
|
|
23 |
{
|
24 |
case 'white':
|
25 |
$selected_cross = itroPath . 'images/close-icon-white.png';
|
26 |
-
|
27 |
case 'white_border':
|
28 |
$selected_cross = itroPath . 'images/close-icon-white-border.png';
|
29 |
-
|
|
|
|
|
|
|
30 |
}
|
31 |
-
echo '<img id="close_cross" src="' . $selected_cross . '" title="';
|
32 |
-
_e('CLOSE','itro-plugin');
|
33 |
-
echo '" onclick="itro_exit_anim();">';
|
34 |
}?>
|
35 |
<div id="popup_content"><?php
|
36 |
$custom_field = stripslashes(itro_get_field('custom_html')); /* insert custom html code */
|
23 |
{
|
24 |
case 'white':
|
25 |
$selected_cross = itroPath . 'images/close-icon-white.png';
|
26 |
+
break;
|
27 |
case 'white_border':
|
28 |
$selected_cross = itroPath . 'images/close-icon-white-border.png';
|
29 |
+
break;
|
30 |
+
case 'url':
|
31 |
+
$selected_cross = itro_get_option('close_cross_url');
|
32 |
+
break;
|
33 |
}
|
34 |
+
echo '<img id="close_cross" src="' . $selected_cross . '" alt="'. __('CLOSE','itro-plugin') .'" title="' . __('CLOSE','itro-plugin') . '" onclick="itro_exit_anim();">';
|
|
|
|
|
35 |
}?>
|
36 |
<div id="popup_content"><?php
|
37 |
$custom_field = stripslashes(itro_get_field('custom_html')); /* insert custom html code */
|