Popup Builder – Responsive WordPress Pop up - Version 3.66

Version Description

Current Version of Popup Builder is 3.66

Download this release

Release Info

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

Code changes from version 3.65.2 to 3.66

com/classes/NotificationCenter.php CHANGED
@@ -1,5 +1,6 @@
1
  <?php
2
  namespace sgpb;
 
3
 
4
  class SGPBNotificationCenter
5
  {
@@ -109,15 +110,49 @@ class SGPBNotificationCenter
109
  return array();
110
  }
111
  asort($notifications);
 
112
  $dismissedNotifications = get_option('sgpb-all-dismissed-notifications');
113
  $dismissedNotifications = json_decode($dismissedNotifications, true);
 
 
114
  foreach ($notifications as $notification) {
115
  $id = @$notification['id'];
116
- if ($hideDismissed) {
117
- if (isset($dismissedNotifications[$id])) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  continue;
119
  }
120
  }
 
 
 
 
 
121
  $activeNotifications[] = $notification;
122
  }
123
  $removedNotifications = get_option('sgpb-all-removed-notifications');
1
  <?php
2
  namespace sgpb;
3
+ use sgpb\AdminHelper;
4
 
5
  class SGPBNotificationCenter
6
  {
110
  return array();
111
  }
112
  asort($notifications);
113
+
114
  $dismissedNotifications = get_option('sgpb-all-dismissed-notifications');
115
  $dismissedNotifications = json_decode($dismissedNotifications, true);
116
+ $extensions = AdminHelper::getAllExtensions();
117
+ $extensionsKeys = wp_list_pluck($extensions['active'], 'key');
118
  foreach ($notifications as $notification) {
119
  $id = @$notification['id'];
120
+
121
+ if (isset($notification['hideFor'])) {
122
+ $hideForExtensions = explode(',', $notification['hideFor']);
123
+ $arraysIntersect = array_intersect($extensionsKeys, $hideForExtensions);
124
+
125
+ // If only one condition -> free, single extension, bundle
126
+ if (count($hideForExtensions) == 1) {
127
+ // Free
128
+ if ($notification['hideFor'] == SGPB_POPUP_PKG_FREE && empty($extensionsKeys) && !class_exists('SGPBActivatorPlugin')) {
129
+ continue;
130
+ }
131
+ // Single extension
132
+ else if (in_array($notification['hideFor'], $extensionsKeys)) {
133
+ continue;
134
+ }
135
+ // Pro, if it is a free user
136
+ else if ($notification['hideFor'] == 'pro' && count($extensionsKeys) >= 1) {
137
+ continue;
138
+ }
139
+ // Bundle
140
+ else if ($notification['hideFor'] == 'bundle') {
141
+ if (class_exists('SGPBActivatorPlugin') || count($extensionsKeys) >= 10) {
142
+ continue;
143
+ }
144
+ }
145
+ }
146
+ // if there is even one detected extension, don’t show notification
147
+ else if (count($arraysIntersect) > 0) {
148
  continue;
149
  }
150
  }
151
+
152
+ if ($hideDismissed && isset($dismissedNotifications[$id])) {
153
+ continue;
154
+ }
155
+
156
  $activeNotifications[] = $notification;
157
  }
158
  $removedNotifications = get_option('sgpb-all-removed-notifications');
com/classes/PopupLoader.php CHANGED
@@ -49,7 +49,10 @@ class PopupLoader
49
 
50
  public function addPopupFromUrl($popupsToLoad)
51
  {
52
- if (isset($_GET['sg_popup_id']) || isset($_GET['sg_popup_preview_id'])) {
 
 
 
53
  $args = array();
54
  $previewPopups = array();
55
  $getterId = isset($_GET['sg_popup_id']) ? (int)$_GET['sg_popup_id'] : 0;
@@ -61,6 +64,9 @@ class PopupLoader
61
  if (function_exists('sgpb\sgpGetCorrectPopupId')) {
62
  $getterId = sgpGetCorrectPopupId($getterId);
63
  }
 
 
 
64
 
65
  $popupFromUrl = SGPopup::find($getterId, $args);
66
  if (!empty($popupFromUrl)) {
49
 
50
  public function addPopupFromUrl($popupsToLoad)
51
  {
52
+ global $wp;
53
+ $currentUrl = home_url( $wp->request );
54
+ $currentUrl = strpos($currentUrl, '/popupbuilder/');
55
+ if (isset($_GET['sg_popup_id']) || isset($_GET['sg_popup_preview_id']) || $currentUrl !== false) {
56
  $args = array();
57
  $previewPopups = array();
58
  $getterId = isset($_GET['sg_popup_id']) ? (int)$_GET['sg_popup_id'] : 0;
64
  if (function_exists('sgpb\sgpGetCorrectPopupId')) {
65
  $getterId = sgpGetCorrectPopupId($getterId);
66
  }
67
+ if ($currentUrl !== false) {
68
+ $getterId = $_GET['preview_id'];
69
+ }
70
 
71
  $popupFromUrl = SGPopup::find($getterId, $args);
72
  if (!empty($popupFromUrl)) {
com/classes/RegisterPostType.php CHANGED
@@ -71,7 +71,8 @@ class RegisterPostType
71
  'capability_type' => array('sgpb_popup', 'sgpb_popups'),
72
  'menu_position' => 10,
73
  'supports' => apply_filters('sgpbPostTypeSupport', array('title', 'editor')),
74
- 'menu_icon' => 'dashicons-menu-icon-sgpb'
 
75
  );
76
 
77
  if (is_admin()) {
@@ -134,6 +135,7 @@ class RegisterPostType
134
  'sort' => 12,
135
  'update_count_callback' => '_update_post_term_count',
136
  'query_var' => true,
 
137
  'capabilities' => array(
138
  'manage_terms' => 'manage_popup_categories_terms',
139
  'edit_terms' => 'manage_popup_categories_terms',
71
  'capability_type' => array('sgpb_popup', 'sgpb_popups'),
72
  'menu_position' => 10,
73
  'supports' => apply_filters('sgpbPostTypeSupport', array('title', 'editor')),
74
+ 'menu_icon' => 'dashicons-menu-icon-sgpb',
75
+ 'show_in_rest' => true
76
  );
77
 
78
  if (is_admin()) {
135
  'sort' => 12,
136
  'update_count_callback' => '_update_post_term_count',
137
  'query_var' => true,
138
+ 'show_in_rest' => true,
139
  'capabilities' => array(
140
  'manage_terms' => 'manage_popup_categories_terms',
141
  'edit_terms' => 'manage_popup_categories_terms',
com/classes/ScriptsLoader.php CHANGED
@@ -61,7 +61,11 @@ class ScriptsLoader
61
  $alreadyLoadedPopups = array();
62
  $popups = $this->getLoadablePopups();
63
  $currentPostType = AdminHelper::getCurrentPostType();
64
- if ($currentPostType == SG_POPUP_POST_TYPE) {
 
 
 
 
65
  return false;
66
  }
67
 
@@ -69,11 +73,6 @@ class ScriptsLoader
69
  return false;
70
  }
71
 
72
- if ($this->getIsAdmin()) {
73
- $this->loadToAdmin();
74
- return true;
75
- }
76
-
77
  global $post;
78
  $postId = 0;
79
 
@@ -81,6 +80,11 @@ class ScriptsLoader
81
  $postId = $post->ID;
82
  }
83
 
 
 
 
 
 
84
  foreach ($popups as $popup) {
85
  $popupId = $popup->getId();
86
 
61
  $alreadyLoadedPopups = array();
62
  $popups = $this->getLoadablePopups();
63
  $currentPostType = AdminHelper::getCurrentPostType();
64
+ $postId = 0;
65
+ global $wp;
66
+ $currentUrl = home_url( $wp->request );
67
+ $currentUrl = strpos($currentUrl, '/popupbuilder/');
68
+ if ($currentPostType == SG_POPUP_POST_TYPE && $currentUrl === false) {
69
  return false;
70
  }
71
 
73
  return false;
74
  }
75
 
 
 
 
 
 
76
  global $post;
77
  $postId = 0;
78
 
80
  $postId = $post->ID;
81
  }
82
 
83
+ if ($this->getIsAdmin()) {
84
+ $this->loadToAdmin();
85
+ return true;
86
+ }
87
+
88
  foreach ($popups as $popup) {
89
  $popupId = $popup->getId();
90
 
com/config/configPackage.php CHANGED
@@ -3,6 +3,6 @@ if (!defined('ABSPATH')) {
3
  exit();
4
  }
5
 
6
- define('SG_POPUP_VERSION', '3.65.2');
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.66');
7
  define('SGPB_POPUP_PKG', SGPB_POPUP_PKG_FREE);
8
  define('POPUP_BUILDER_BASENAME', 'popupbuilder-platinum/popup-builder.php');
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.65.2
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.66
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.4
11
  Requires PHP: 5.3.3
12
- Stable tag: 3.65.2
13
  License: GPLv2 or later
14
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
15
 
@@ -185,6 +185,11 @@ Go to the Popup Builder settings and set your desired options.
185
 
186
  == Changelog ==
187
 
 
 
 
 
 
188
  = Version 3.65.2 =
189
  * Added support links.
190
  * Bug fixed related to mobile landscape view.
@@ -1166,7 +1171,7 @@ Leave us a good review :)
1166
 
1167
  == Upgrade Notice ==
1168
 
1169
- Current Version of Popup Builder is 3.65.2
1170
 
1171
  == Other Notes ==
1172
 
9
  Requires at least: 3.8
10
  Tested up to: 5.4
11
  Requires PHP: 5.3.3
12
+ Stable tag: 3.66
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.66 =
189
+ * Compatability issues fixed related to Gutenberg.
190
+ * Minor improvements.
191
+ * Notices fixed.
192
+
193
  = Version 3.65.2 =
194
  * Added support links.
195
  * Bug fixed related to mobile landscape view.
1171
 
1172
  == Upgrade Notice ==
1173
 
1174
+ Current Version of Popup Builder is 3.66
1175
 
1176
  == Other Notes ==
1177