Popup Builder – Responsive WordPress Pop up - Version 2.6.5

Version Description

Current Version of Popup Builder is 2.6.4.6

Download this release

Release Info

Developer Sygnoos
Plugin Icon 128x128 Popup Builder – Responsive WordPress Pop up
Version 2.6.5
Comparing to
See all releases

Code changes from version 2.6.4.6 to 2.6.5

classes/SGHtmlPopup.php CHANGED
@@ -56,11 +56,7 @@ class SGHtmlPopup extends SGPopup {
56
  return $content;
57
  }
58
  $iframeUrl = $match[1];
59
- $isAutoPlay = stripos($iframeUrl,'autoplay=1');
60
 
61
- if(!$isAutoPlay) {
62
- return $content;
63
- }
64
  $popupOptions = $this->getOptions();
65
  $popupOptions = json_decode($popupOptions, true);
66
 
56
  return $content;
57
  }
58
  $iframeUrl = $match[1];
 
59
 
 
 
 
60
  $popupOptions = $this->getOptions();
61
  $popupOptions = json_decode($popupOptions, true);
62
 
config.php CHANGED
@@ -24,7 +24,7 @@ if(!class_exists('SgPopupBuilderConfig')) {
24
  define('SG_APP_POPUP_JS', SG_APP_POPUP_PATH . '/javascript');
25
  define('SG_APP_POPUP_HELPERS', SG_APP_POPUP_PATH . '/helpers/');
26
  define('SG_APP_POPUP_TABLE_LIMIT', 15);
27
- define('SG_POPUP_VERSION', 2.6546);
28
  define('SG_POPUP_PRO_VERSION', 3.376);
29
  define('SG_POPUP_PRO_URL', 'https://popup-builder.com/');
30
  define('SG_POPUP_EXTENSION_URL', 'https://popup-builder.com/extensions');
24
  define('SG_APP_POPUP_JS', SG_APP_POPUP_PATH . '/javascript');
25
  define('SG_APP_POPUP_HELPERS', SG_APP_POPUP_PATH . '/helpers/');
26
  define('SG_APP_POPUP_TABLE_LIMIT', 15);
27
+ define('SG_POPUP_VERSION', 2.65);
28
  define('SG_POPUP_PRO_VERSION', 3.376);
29
  define('SG_POPUP_PRO_URL', 'https://popup-builder.com/');
30
  define('SG_POPUP_EXTENSION_URL', 'https://popup-builder.com/extensions');
files/sg_functions.php CHANGED
@@ -389,6 +389,42 @@ class SGFunctions
389
  return $deleteStatus;
390
  }
391
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
392
  public static function addReview()
393
  {
394
  $ajaxNonce = wp_create_nonce("sgPopupBuilderReview");
389
  return $deleteStatus;
390
  }
391
 
392
+ public static function discountDay11()
393
+ {
394
+ $reviewPanel = '';
395
+ wp_register_style('sgpbDiscountDay11', SG_APP_POPUP_URL . '/style/discountDay11.css');
396
+ wp_enqueue_style('sgpbDiscountDay11');
397
+ wp_register_script('sgpbDiscountDays', SG_APP_POPUP_URL . '/javascript/sgpbDiscountDays.js', array(), SG_POPUP_VERSION);
398
+ wp_enqueue_script('sgpbDiscountDays');
399
+ $ajaxNonce = wp_create_nonce("sgPopupBuilderReview");
400
+ $discountDay11 = get_option('discountDay11');
401
+
402
+ $timeDate = new DateTime('now', new DateTimeZone('Asia/Yerevan'));
403
+ $timeNow = strtotime($timeDate->format('Y-m-d H:i:s'));
404
+ $startTime = '1510244520';
405
+ $endData = '1510530900';
406
+
407
+ if(!($timeNow > $startTime && $timeNow < $endData) || $discountDay11) {
408
+ return $reviewPanel;
409
+ }
410
+
411
+ ob_start();
412
+ ?>
413
+ <div class="sg-info-panel-wrapper-day11">
414
+ <div class="sg-info-panel-row-day11" onclick="window.open('https://popup-builder.com/')">
415
+ </div>
416
+ <div>
417
+ <div class="sgpb-visit-web-site-day11" onclick="window.open('https://popup-builder.com/')"><span>Visit our website</span></div>
418
+ <?php echo '<span class="sg-dont-show-again-day11" data-discount="discountDay11" data-ajaxnonce="'.esc_attr($ajaxNonce).'">Don’t show again.</span>'; ?>
419
+ </div>
420
+ </div>
421
+ <?php
422
+ $reviewPanel = ob_get_contents();
423
+ ob_end_clean();
424
+
425
+ return $reviewPanel;
426
+ }
427
+
428
  public static function addReview()
429
  {
430
  $ajaxNonce = wp_create_nonce("sgPopupBuilderReview");
files/sg_popup_actions.php CHANGED
@@ -40,8 +40,16 @@ class sgPopupActions {
40
  }
41
  }
42
 
 
 
 
 
 
 
 
43
  public function popupBuilderShowReviewNotice()
44
  {
 
45
  $messageContent = '';
46
  $maxOpenPopupStatus = SGFunctions::shouldOpenForMaxOpenPopupMessage();
47
  $shouldOpenForDays = SGFunctions::shouldOpenReviewPopupForDays();
40
  }
41
  }
42
 
43
+ public function discountDay11()
44
+ {
45
+ $messageContent = SGFunctions::discountDay11();
46
+
47
+ echo $messageContent;
48
+ }
49
+
50
  public function popupBuilderShowReviewNotice()
51
  {
52
+ $this->discountDay11();
53
  $messageContent = '';
54
  $maxOpenPopupStatus = SGFunctions::shouldOpenForMaxOpenPopupMessage();
55
  $shouldOpenForDays = SGFunctions::shouldOpenReviewPopupForDays();
files/sg_popup_ajax.php CHANGED
@@ -26,6 +26,17 @@ function sgPopupDelete()
26
 
27
  add_action('wp_ajax_delete_popup', 'sgPopupDelete');
28
 
 
 
 
 
 
 
 
 
 
 
 
29
  function sgFrontend()
30
  {
31
  global $wpdb;
26
 
27
  add_action('wp_ajax_delete_popup', 'sgPopupDelete');
28
 
29
+ function sgpbDiscountDays()
30
+ {
31
+ check_ajax_referer('sgPopupBuilderReview', 'nonce');
32
+ $discountDay = sanitize_text_field($_POST['discountDay']);
33
+
34
+ echo update_option($discountDay, 1);
35
+ wp_die();
36
+ }
37
+
38
+ add_action('wp_ajax_discountDays', 'sgpbDiscountDays');
39
+
40
  function sgFrontend()
41
  {
42
  global $wpdb;
files/sg_popup_create_new.php CHANGED
@@ -1522,28 +1522,6 @@ if (isset($_GET["titleError"])): ?>
1522
  <span class="liquid-width">Popup z-index:</span><input class="input-width-static" type="number" name="popup-z-index" value="<?php echo esc_attr($sgPopupZIndex);?>">
1523
  <br>
1524
 
1525
- <?php if(!sgRemoveOption('popupContentBgImage')): ?>
1526
- <span class="liquid-width">Popup background image:</span><input class="input-width-static js-popup-content-bg-image" type="checkbox" name="popupContentBgImage" <?php echo $sgPopupContentBgImage;?>><span class="dashicons dashicons-info repeatPopup same-image-style"></span><span class="infoSelectRepeat samefontStyle">Enable this option if you need to have background image for popup.</span><br>
1527
- <div class="acordion-main-div-content js-popup-content-bg-image-wrapper">
1528
- <span class="liquid-width">Background size:</span>
1529
- <?php echo sgCreateSelect($sgPopupBgSizes,'popupContentBackgroundSize',esc_html(@$sgPopupContentBackgroundSize));?>
1530
- <span class="liquid-width">Background repeat:</span>
1531
- <?php echo sgCreateSelect($sgPopupBgRepeat,'popupContentBackgroundRepeat',esc_html(@$sgPopupContentBackgroundRepeat));?>
1532
-
1533
- <div class="sg-wp-editor-container">
1534
- <div class="liquid-width-div sg-vertical-top">
1535
- <input id="js-upload-image-button" class="button popup-content-bg-image-btn" type="button" value="Select image">
1536
- </div>
1537
- <input class="input-width-static popup-content-bg-image-url" id="js-upload-image" type="text" size="36" name="popupContentBgImageUrl" value="<?php echo esc_attr($sgPopupContentBgImageUrl); ?>" >
1538
- <span class="liquid-width-div"></span>
1539
- <div class="show-image-contenier popup-content-bg-image-preview">
1540
- <span class="no-image">(No image selected)</span>
1541
- </div>
1542
- </div>
1543
-
1544
- </div>
1545
- <?php endif; ?>
1546
-
1547
  <?php if (!sgRemoveOption('popup-content-padding')): ?>
1548
  <span class="liquid-width">Content padding:</span><input class="input-width-static" type="number" name="popup-content-padding" value="<?php echo esc_attr($sgPopupContentPadding);?>">
1549
  <br>
1522
  <span class="liquid-width">Popup z-index:</span><input class="input-width-static" type="number" name="popup-z-index" value="<?php echo esc_attr($sgPopupZIndex);?>">
1523
  <br>
1524
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1525
  <?php if (!sgRemoveOption('popup-content-padding')): ?>
1526
  <span class="liquid-width">Content padding:</span><input class="input-width-static" type="number" name="popup-content-padding" value="<?php echo esc_attr($sgPopupContentPadding);?>">
1527
  <br>
img/day11Bg.jpg ADDED
Binary file
javascript/sgpbDiscountDays.js ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function sgpbDiscountDays() {
2
+
3
+ }
4
+
5
+ sgpbDiscountDays.prototype.init = function()
6
+ {
7
+ if (!jQuery('.sg-dont-show-again-day11').length) {
8
+ return false;
9
+ }
10
+ var that = this;
11
+
12
+ jQuery('.sg-dont-show-again-day11').bind('click', function() {
13
+ jQuery('.sg-info-panel-wrapper-day11').remove();
14
+ var nonce = jQuery(this).attr('data-ajaxnonce');
15
+ var discountDay = jQuery(this).attr('data-discount');
16
+
17
+ var data = {
18
+ action: 'discountDays',
19
+ discountDay: discountDay,
20
+ nonce: nonce
21
+ };
22
+
23
+ jQuery.post(ajaxurl, data, function(responce) {
24
+
25
+ });
26
+ });
27
+ };
28
+
29
+ jQuery(document).ready(function() {
30
+ var obj = new sgpbDiscountDays();
31
+ obj.init();
32
+ });
popup-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Popup Builder
4
  * Plugin URI: http://sygnoos.com
5
  * Description: The most complete popup plugin. Html, image, iframe, shortcode, video and many other popup types. Manage popup dimensions, effects, themes and more.
6
- * Version: 2.6.4.6
7
  * Author: Sygnoos
8
  * Author URI: http://www.sygnoos.com
9
  * License: GPLv2
3
  * Plugin Name: Popup Builder
4
  * Plugin URI: http://sygnoos.com
5
  * Description: The most complete popup plugin. Html, image, iframe, shortcode, video and many other popup types. Manage popup dimensions, effects, themes and more.
6
+ * Version: 2.6.5
7
  * Author: Sygnoos
8
  * Author URI: http://www.sygnoos.com
9
  * License: GPLv2
readme.txt CHANGED
@@ -166,6 +166,11 @@ Go to the Popup Builder settings and set your desired options.
166
 
167
  == Changelog ==
168
 
 
 
 
 
 
169
  = Version 2.6.4.6 =
170
  * Added a new option, to show the popup close button with configurable delay option.
171
  * Added tooltip next to Preview button, to show how to setup popup in page or post.
166
 
167
  == Changelog ==
168
 
169
+ = Version 2.6.5 =
170
+ * Bug fixed connected to Iframe video autoplay.
171
+
172
+ = Version 2.6.4.6 =
173
+
174
  = Version 2.6.4.6 =
175
  * Added a new option, to show the popup close button with configurable delay option.
176
  * Added tooltip next to Preview button, to show how to setup popup in page or post.
style/discountDay11.css ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .sg-info-panel-wrapper-day11 {
2
+ height: 175px;
3
+ position: relative;
4
+ width: 100%;
5
+ background-image: url('../img/day11Bg.jpg');
6
+ background-repeat: no-repeat;
7
+ background-size: 100% 100%;
8
+ color: #fff;
9
+ padding-bottom: 10px;
10
+ padding-top: 5px;
11
+ line-height: 1.231;
12
+ cursor: pointer;
13
+ margin-bottom: 10px;
14
+ }
15
+
16
+ .sg-dont-show-again-day11 {
17
+ position: absolute;
18
+ bottom: 10px;
19
+ right: 12px;
20
+ cursor: pointer
21
+ }
22
+
23
+ .sgpb-visit-web-site-day11 {
24
+ position: absolute;
25
+ bottom: 30px;
26
+ right: 15px !important;
27
+ cursor: pointer
28
+ }