Popup Builder – Responsive WordPress Pop up - Version 3.61.1

Version Description

Current Version of Popup Builder is 3.61

Download this release

Release Info

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

Code changes from version 3.61 to 3.61.1

com/classes/popups/SGPopup.php CHANGED
@@ -552,7 +552,7 @@ abstract class SGPopup
552
  $defaultData = ConfigDataHelper::defaultData();
553
  $defaultDataJs = $defaultData['customEditorContent']['js']['helperText'];
554
  $defaultDataCss = $defaultData['customEditorContent']['css']['oldDefaultValue'];
555
-
556
  $finalData = array('js' => array(), 'css' => array());
557
  $alreadySavedData = get_post_meta($popupId, 'sg_popup_scripts', true);
558
 
@@ -564,7 +564,7 @@ abstract class SGPopup
564
  $temp = preg_replace('/\s/', '', $finalData['css']);
565
 
566
  unset($data['sgpb-css-editor']);
567
-
568
  if ($temp == $defaultDataCss) {
569
  unset($finalData['css']);
570
  }
@@ -805,8 +805,8 @@ abstract class SGPopup
805
  }
806
 
807
  $popupOptions = self::getPopupOptionsById($popupId, $saveMode);
808
- if (is_array($popupSavedData) && is_array($popupOptions)) {
809
- $popupSavedData = array_merge($popupSavedData, $popupOptions);
810
  }
811
 
812
  return $popupSavedData;
552
  $defaultData = ConfigDataHelper::defaultData();
553
  $defaultDataJs = $defaultData['customEditorContent']['js']['helperText'];
554
  $defaultDataCss = $defaultData['customEditorContent']['css']['oldDefaultValue'];
555
+
556
  $finalData = array('js' => array(), 'css' => array());
557
  $alreadySavedData = get_post_meta($popupId, 'sg_popup_scripts', true);
558
 
564
  $temp = preg_replace('/\s/', '', $finalData['css']);
565
 
566
  unset($data['sgpb-css-editor']);
567
+
568
  if ($temp == $defaultDataCss) {
569
  unset($finalData['css']);
570
  }
805
  }
806
 
807
  $popupOptions = self::getPopupOptionsById($popupId, $saveMode);
808
+ if (is_array($popupOptions) && is_array($popupSavedData)) {
809
+ $popupSavedData = array_merge($popupSavedData, $popupOptions);
810
  }
811
 
812
  return $popupSavedData;
com/config/configPackage.php CHANGED
@@ -3,6 +3,6 @@ if (!defined('ABSPATH')) {
3
  exit();
4
  }
5
 
6
- define('SG_POPUP_VERSION', '3.61');
7
  define('SGPB_POPUP_PKG', SGPB_POPUP_PKG_FREE);
8
  define('POPUP_BUILDER_BASENAME', 'popupbuilder-platinum/popup-builder.php');
3
  exit();
4
  }
5
 
6
+ define('SG_POPUP_VERSION', '3.61.1');
7
  define('SGPB_POPUP_PKG', SGPB_POPUP_PKG_FREE);
8
  define('POPUP_BUILDER_BASENAME', 'popupbuilder-platinum/popup-builder.php');
com/helpers/AdminHelper.php CHANGED
@@ -849,15 +849,12 @@ class AdminHelper
849
  public static function getImageDataFromUrl($imageUrl, $shouldNotConvertBase64 = false)
850
  {
851
  $remoteData = wp_remote_get($imageUrl);
852
- $originalImageUrl = $imageUrl;
853
- if (is_wp_error($remoteData) && isset($remoteData['response']) && $remoteData['response']['code'] == 404) {
854
- if ($shouldNotConvertBase64) {
855
- $imageUrl = SG_POPUP_IMG_URL.'NoImage.png';
856
- }
857
- }
858
- else {
859
- $imageUrl = $originalImageUrl;
860
  }
 
861
  if (!$shouldNotConvertBase64) {
862
  $imageData = wp_remote_retrieve_body($remoteData);
863
  $imageUrl = base64_encode($imageData);
@@ -1682,10 +1679,10 @@ class AdminHelper
1682
  $customScripts = '<script id="sgpb-custom-script-'.$popupId.'">';
1683
  foreach ($jsDefaultData as $key => $value) {
1684
  $eventName = 'sgpb'.$key;
1685
- $content = @$jsPostMeta['sgpb-'.$key];
1686
- if (empty($content) || $key == 'ShouldOpen' || $key == 'ShouldClose') {
1687
  continue;
1688
  }
 
1689
  $content = str_replace('popupId', $popupId, $content);
1690
  $content = html_entity_decode($content);
1691
 
849
  public static function getImageDataFromUrl($imageUrl, $shouldNotConvertBase64 = false)
850
  {
851
  $remoteData = wp_remote_get($imageUrl);
852
+ $headers = wp_remote_retrieve_headers($remoteData);
853
+ if ((empty($headers) || (isset($headers['content-type']) && strpos($headers['content-type'], 'image/') === false))
854
+ || (is_wp_error($remoteData) && $shouldNotConvertBase64)) {
855
+ return SG_POPUP_IMG_URL.'NoImage.png';
 
 
 
 
856
  }
857
+
858
  if (!$shouldNotConvertBase64) {
859
  $imageData = wp_remote_retrieve_body($remoteData);
860
  $imageUrl = base64_encode($imageData);
1679
  $customScripts = '<script id="sgpb-custom-script-'.$popupId.'">';
1680
  foreach ($jsDefaultData as $key => $value) {
1681
  $eventName = 'sgpb'.$key;
1682
+ if ((!isset($jsPostMeta['sgpb-'.$key]) || empty($jsPostMeta['sgpb-'.$key])) || $key == 'ShouldOpen' || $key == 'ShouldClose') {
 
1683
  continue;
1684
  }
1685
+ $content = @$jsPostMeta['sgpb-'.$key];
1686
  $content = str_replace('popupId', $popupId, $content);
1687
  $content = html_entity_decode($content);
1688
 
popup-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Popup Builder
4
  * Plugin URI: https://popup-builder.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: 3.61
7
  * Author: Sygnoos
8
  * Author URI: https://sygnoos.com
9
  * License: GPLv2
3
  * Plugin Name: Popup Builder
4
  * Plugin URI: https://popup-builder.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: 3.61.1
7
  * Author: Sygnoos
8
  * Author URI: https://sygnoos.com
9
  * License: GPLv2
readme.txt CHANGED
@@ -9,7 +9,7 @@ Tags: popup, pop up, wordpress popup, popup maker, exit popup, popup builder, wo
9
  Requires at least: 3.8
10
  Tested up to: 5.3
11
  Requires PHP: 5.3.3
12
- Stable tag: 3.61
13
  License: GPLv2 or later
14
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
15
 
@@ -185,6 +185,9 @@ Go to the Popup Builder settings and set your desired options.
185
 
186
  == Changelog ==
187
 
 
 
 
188
  = Version 3.61 =
189
  * Improvement: No code content will be loaded if the custom JS/CSS doesn't contain any code.
190
  * Improvement: Relative plugin path has been used.
9
  Requires at least: 3.8
10
  Tested up to: 5.3
11
  Requires PHP: 5.3.3
12
+ Stable tag: 3.61.1
13
  License: GPLv2 or later
14
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
15
 
185
 
186
  == Changelog ==
187
 
188
+ = Version 3.61.1 =
189
+ * Minor fix related to image popup.
190
+
191
  = Version 3.61 =
192
  * Improvement: No code content will be loaded if the custom JS/CSS doesn't contain any code.
193
  * Improvement: Relative plugin path has been used.