Version Description
Current Version of Popup Builder is 2.6.7
Download this release
Release Info
Developer | Sygnoos |
Plugin | Popup Builder – Responsive WordPress Pop up |
Version | 3.0.4 |
Comparing to | |
See all releases |
Code changes from version 3.0.3 to 3.0.4
- com/classes/Actions.php +20 -0
- com/classes/Filters.php +19 -0
- com/classes/Installer.php +2 -0
- com/classes/PopupChecker.php +4 -1
- com/classes/ScriptsLoader.php +2 -2
- com/classes/extension/SgpbPopupExtension.php +1 -1
- com/classes/popups/SGPopup.php +1 -1
- com/config/config.php +1 -0
- com/config/configPackage.php +1 -1
- com/config/dataConfig.php +5 -1
- com/libs/Table.php +6 -4
- popup-builder.php +1 -1
- public/css/theme.css +1 -1
- public/js/PopupBuilder.js +6 -1
- public/js/PopupConfig.js +1 -1
- readme.txt +9 -0
com/classes/Actions.php
CHANGED
@@ -55,9 +55,29 @@ class Actions
|
|
55 |
add_filter('wp_insert_post_data', array($this, 'editPublishSettings'), 100, 1);
|
56 |
// for change admin popup list order
|
57 |
add_action('pre_get_posts', array($this, 'preGetPosts'));
|
|
|
58 |
new Ajax();
|
59 |
}
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
public function editPublishSettings($post)
|
62 |
{
|
63 |
if (isset($post['post_type']) && $post['post_type'] == SG_POPUP_POST_TYPE) {
|
55 |
add_filter('wp_insert_post_data', array($this, 'editPublishSettings'), 100, 1);
|
56 |
// for change admin popup list order
|
57 |
add_action('pre_get_posts', array($this, 'preGetPosts'));
|
58 |
+
add_action('template_redirect',array($this, 'redirectFromPopupPage'));
|
59 |
new Ajax();
|
60 |
}
|
61 |
|
62 |
+
public function redirectFromPopupPage()
|
63 |
+
{
|
64 |
+
global $post;
|
65 |
+
|
66 |
+
$currentPostType = @$post->post_type;
|
67 |
+
// in some themes global $post returns null
|
68 |
+
if (empty($currentPostType)) {
|
69 |
+
global $post_type;
|
70 |
+
$currentPostType = $post_type;
|
71 |
+
}
|
72 |
+
|
73 |
+
if (is_single() && SG_POPUP_POST_TYPE == $currentPostType && !is_preview()) {
|
74 |
+
status_header(301);
|
75 |
+
$homeURL = home_url();
|
76 |
+
wp_redirect($homeURL);
|
77 |
+
exit();
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
public function editPublishSettings($post)
|
82 |
{
|
83 |
if (isset($post['post_type']) && $post['post_type'] == SG_POPUP_POST_TYPE) {
|
com/classes/Filters.php
CHANGED
@@ -23,6 +23,25 @@ class Filters
|
|
23 |
add_filter('preview_post_link', array($this, 'editPopupPreviewLink'), 10, 2);
|
24 |
add_filter('upgrader_pre_download', array($this, 'maybeShortenEddFilename'), 10, 4);
|
25 |
add_filter('sgpbSavedPostData', array($this, 'savedPostData'), 10, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
|
28 |
public function savedPostData($postData)
|
23 |
add_filter('preview_post_link', array($this, 'editPopupPreviewLink'), 10, 2);
|
24 |
add_filter('upgrader_pre_download', array($this, 'maybeShortenEddFilename'), 10, 4);
|
25 |
add_filter('sgpbSavedPostData', array($this, 'savedPostData'), 10, 1);
|
26 |
+
add_filter('sgpbPopupEvents', array($this, 'popupEvents'), 10, 1);
|
27 |
+
}
|
28 |
+
|
29 |
+
public function popupEvents($events)
|
30 |
+
{
|
31 |
+
foreach ($events as $eventKey => $eventData) {
|
32 |
+
if (isset($eventData['param']) && $eventData['param'] == SGPB_CSS_CLASS_ACTIONS_KEY) {
|
33 |
+
unset($events[$eventKey]);
|
34 |
+
$events[] = array('param' => 'click');
|
35 |
+
$events[] = array('param' => 'hover');
|
36 |
+
$events[] = array('param' => 'confirm');
|
37 |
+
|
38 |
+
if (SGPB_POPUP_PKG > SGPB_POPUP_PKG_FREE) {
|
39 |
+
$events[] = array('param' => 'iframe');
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
return $events;
|
45 |
}
|
46 |
|
47 |
public function savedPostData($postData)
|
com/classes/Installer.php
CHANGED
@@ -237,6 +237,8 @@ class Installer
|
|
237 |
return $tables;
|
238 |
}
|
239 |
|
|
|
|
|
240 |
foreach ($popupTypes as $popupTypeKey => $popupTypeLevel) {
|
241 |
if (SGPB_POPUP_PKG >= $popupTypeLevel) {
|
242 |
$className = ucfirst($popupTypeKey).'Popup';
|
237 |
return $tables;
|
238 |
}
|
239 |
|
240 |
+
require_once(SG_POPUP_CONFIG_PATH.'configPackage.php');
|
241 |
+
|
242 |
foreach ($popupTypes as $popupTypeKey => $popupTypeLevel) {
|
243 |
if (SGPB_POPUP_PKG >= $popupTypeLevel) {
|
244 |
$className = ucfirst($popupTypeKey).'Popup';
|
com/classes/PopupChecker.php
CHANGED
@@ -313,12 +313,15 @@ class PopupChecker
|
|
313 |
if (empty($targetData['param'])) {
|
314 |
return $isSatisfy;
|
315 |
}
|
316 |
-
|
317 |
$post = $this->getPost();
|
318 |
if (isset($post) && empty($postId)) {
|
319 |
$postId = $post->ID;
|
320 |
}
|
321 |
|
|
|
|
|
|
|
322 |
if (strpos($targetData['param'], '_all')) {
|
323 |
$endIndex = strpos($targetData['param'], '_all');
|
324 |
$postType = substr($targetData['param'], 0, $endIndex);
|
313 |
if (empty($targetData['param'])) {
|
314 |
return $isSatisfy;
|
315 |
}
|
316 |
+
$targetParam = $targetData['param'];
|
317 |
$post = $this->getPost();
|
318 |
if (isset($post) && empty($postId)) {
|
319 |
$postId = $post->ID;
|
320 |
}
|
321 |
|
322 |
+
if ($targetParam == 'everywhere') {
|
323 |
+
return true;
|
324 |
+
}
|
325 |
if (strpos($targetData['param'], '_all')) {
|
326 |
$endIndex = strpos($targetData['param'], '_all');
|
327 |
$postType = substr($targetData['param'], 0, $endIndex);
|
com/classes/ScriptsLoader.php
CHANGED
@@ -66,7 +66,7 @@ class ScriptsLoader
|
|
66 |
$this->loadToAdmin();
|
67 |
return true;
|
68 |
}
|
69 |
-
|
70 |
global $post;
|
71 |
if (empty($post)) {
|
72 |
return false;
|
@@ -85,7 +85,7 @@ class ScriptsLoader
|
|
85 |
$popupContent = apply_filters('sgpbPopupContentLoadToPage', $popup->getPopupTypeContent());
|
86 |
|
87 |
add_action('wp_footer', function() use ($popupId, $events, $popupOptions, $popupContent) {
|
88 |
-
$footerPopupContent = '<div style="position:
|
89 |
<div class="sg-popup-builder-content" id="sg-popup-content-wrapper-'.$popupId.'" data-id="'.esc_attr($popupId).'" data-events="'.esc_attr($events).'" data-options="'.esc_attr($popupOptions).'">
|
90 |
<div class="sgpb-popup-builder-content-'.esc_attr($popupId).' sgpb-popup-builder-content-html">'.$popupContent.'</div>
|
91 |
</div>
|
66 |
$this->loadToAdmin();
|
67 |
return true;
|
68 |
}
|
69 |
+
|
70 |
global $post;
|
71 |
if (empty($post)) {
|
72 |
return false;
|
85 |
$popupContent = apply_filters('sgpbPopupContentLoadToPage', $popup->getPopupTypeContent());
|
86 |
|
87 |
add_action('wp_footer', function() use ($popupId, $events, $popupOptions, $popupContent) {
|
88 |
+
$footerPopupContent = '<div style="position:fixed;bottom: -999999999999999999999px;">
|
89 |
<div class="sg-popup-builder-content" id="sg-popup-content-wrapper-'.$popupId.'" data-id="'.esc_attr($popupId).'" data-events="'.esc_attr($events).'" data-options="'.esc_attr($popupOptions).'">
|
90 |
<div class="sgpb-popup-builder-content-'.esc_attr($popupId).' sgpb-popup-builder-content-html">'.$popupContent.'</div>
|
91 |
</div>
|
com/classes/extension/SgpbPopupExtension.php
CHANGED
@@ -255,7 +255,7 @@ class SgpbPopupExtension implements SgpbIPopupExtension
|
|
255 |
);
|
256 |
|
257 |
$localizeData[] = array(
|
258 |
-
'handle' => '
|
259 |
'name' => 'SGPB_JS_PARAMS',
|
260 |
'data' => array(
|
261 |
'ajaxUrl' => admin_url('admin-ajax.php'),
|
255 |
);
|
256 |
|
257 |
$localizeData[] = array(
|
258 |
+
'handle' => 'PopupBuilder.js',
|
259 |
'name' => 'SGPB_JS_PARAMS',
|
260 |
'data' => array(
|
261 |
'ajaxUrl' => admin_url('admin-ajax.php'),
|
com/classes/popups/SGPopup.php
CHANGED
@@ -134,7 +134,7 @@ abstract class SGPopup
|
|
134 |
$events = array_merge($events, $optionEvents);
|
135 |
}
|
136 |
|
137 |
-
return $events;
|
138 |
}
|
139 |
|
140 |
public function getContent()
|
134 |
$events = array_merge($events, $optionEvents);
|
135 |
}
|
136 |
|
137 |
+
return apply_filters('sgpbPopupEvents', $events);
|
138 |
}
|
139 |
|
140 |
public function getContent()
|
com/config/config.php
CHANGED
@@ -77,6 +77,7 @@ class SgpbPopupConfig
|
|
77 |
self::addDefine('SGPB_POPUP_EXTENSIONS_PATH', SG_POPUP_COM_PATH.'extensions/');
|
78 |
self::addDefine('SGPB_DONT_SHOW_POPUP_EXPIRY', 365);
|
79 |
self::addDefine('SGPB_CONTACT_FORM_7_BEHAVIOR_KEY', 'contact-form-7');
|
|
|
80 |
self::popupTypesInit();
|
81 |
}
|
82 |
|
77 |
self::addDefine('SGPB_POPUP_EXTENSIONS_PATH', SG_POPUP_COM_PATH.'extensions/');
|
78 |
self::addDefine('SGPB_DONT_SHOW_POPUP_EXPIRY', 365);
|
79 |
self::addDefine('SGPB_CONTACT_FORM_7_BEHAVIOR_KEY', 'contact-form-7');
|
80 |
+
self::addDefine('SGPB_CSS_CLASS_ACTIONS_KEY', 'setByCssClass');
|
81 |
self::popupTypesInit();
|
82 |
}
|
83 |
|
com/config/configPackage.php
CHANGED
@@ -3,6 +3,6 @@ if (!defined('ABSPATH')) {
|
|
3 |
exit();
|
4 |
}
|
5 |
|
6 |
-
define('SG_POPUP_VERSION', '3.0.
|
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.0.4');
|
7 |
define('SGPB_POPUP_PKG', SGPB_POPUP_PKG_FREE);
|
8 |
define('POPUP_BUILDER_BASENAME', 'popupbuilder-platinum/popup-builder.php');
|
com/config/dataConfig.php
CHANGED
@@ -31,6 +31,7 @@ class SgpbDataConfig
|
|
31 |
|
32 |
$targetParams = array(
|
33 |
'not_rule' => __('Select rule', SG_POPUP_TEXT_DOMAIN),
|
|
|
34 |
'Post' => array(
|
35 |
'post_all' => __('All posts', SG_POPUP_TEXT_DOMAIN),
|
36 |
'post_selected' => __('Selected posts', SG_POPUP_TEXT_DOMAIN),
|
@@ -72,6 +73,7 @@ class SgpbDataConfig
|
|
72 |
$targetDataParams['page_type'] = apply_filters('sgPopupTargetPostType', ConfigDataHelper::getPageTypes());
|
73 |
$targetDataParams['page_template'] = apply_filters('sgPopupPageTemplates', array());
|
74 |
$targetDataParams['post_tags_ids'] = apply_filters('sgPopupTags', ConfigDataHelper::getAllTags());
|
|
|
75 |
$targetDataParams['not_rule'] = null;
|
76 |
$targetDataParams['post_all'] = null;
|
77 |
$targetDataParams['page_all'] = null;
|
@@ -232,7 +234,8 @@ class SgpbDataConfig
|
|
232 |
$params = array(
|
233 |
'load' => 'On load',
|
234 |
'inactivity'=>'Inactivity',
|
235 |
-
'onScroll'=> 'On scroll'
|
|
|
236 |
);
|
237 |
|
238 |
$hiddenOptionData['load'] = array(
|
@@ -249,6 +252,7 @@ class SgpbDataConfig
|
|
249 |
$eventsDataParams['load'] = $onLoadData;
|
250 |
$eventsDataParams['onScroll'] = $onScroll;
|
251 |
$eventsDataParams['inactivity'] = $inactivityData;
|
|
|
252 |
/*Hidden params data*/
|
253 |
$eventsDataParams['repetitive'] = '';
|
254 |
$eventsDataParams['repetitivePeriod'] = 0;
|
31 |
|
32 |
$targetParams = array(
|
33 |
'not_rule' => __('Select rule', SG_POPUP_TEXT_DOMAIN),
|
34 |
+
'everywhere' => __('Everywhere', SG_POPUP_TEXT_DOMAIN),
|
35 |
'Post' => array(
|
36 |
'post_all' => __('All posts', SG_POPUP_TEXT_DOMAIN),
|
37 |
'post_selected' => __('Selected posts', SG_POPUP_TEXT_DOMAIN),
|
73 |
$targetDataParams['page_type'] = apply_filters('sgPopupTargetPostType', ConfigDataHelper::getPageTypes());
|
74 |
$targetDataParams['page_template'] = apply_filters('sgPopupPageTemplates', array());
|
75 |
$targetDataParams['post_tags_ids'] = apply_filters('sgPopupTags', ConfigDataHelper::getAllTags());
|
76 |
+
$targetDataParams['everywhere'] = null;
|
77 |
$targetDataParams['not_rule'] = null;
|
78 |
$targetDataParams['post_all'] = null;
|
79 |
$targetDataParams['page_all'] = null;
|
234 |
$params = array(
|
235 |
'load' => 'On load',
|
236 |
'inactivity'=>'Inactivity',
|
237 |
+
'onScroll'=> 'On scroll',
|
238 |
+
SGPB_CSS_CLASS_ACTIONS_KEY => __('Set by CSS class', SG_POPUP_TEXT_DOMAIN)
|
239 |
);
|
240 |
|
241 |
$hiddenOptionData['load'] = array(
|
252 |
$eventsDataParams['load'] = $onLoadData;
|
253 |
$eventsDataParams['onScroll'] = $onScroll;
|
254 |
$eventsDataParams['inactivity'] = $inactivityData;
|
255 |
+
$eventsDataParams[SGPB_CSS_CLASS_ACTIONS_KEY] = null;
|
256 |
/*Hidden params data*/
|
257 |
$eventsDataParams['repetitive'] = '';
|
258 |
$eventsDataParams['repetitivePeriod'] = 0;
|
com/libs/Table.php
CHANGED
@@ -194,7 +194,6 @@ class SGPBTable extends SGPBListTable
|
|
194 |
$subscriptionPopups = SubscriptionPopup::getAllSubscriptionForms();
|
195 |
$subscribersDates = SubscriptionPopup::getAllSubscribersDate();
|
196 |
$uniqueDates = array();
|
197 |
-
$uniqueDates[] = array('date-title' => 'All dates', 'date-value' => 'all');
|
198 |
foreach ($subscribersDates as $arr) {
|
199 |
$uniqueDates[] = $arr;
|
200 |
}
|
@@ -233,7 +232,7 @@ class SGPBTable extends SGPBListTable
|
|
233 |
<input type="hidden" class="sgpb-subscribers-date" name="sgpb-subscribers-date" value="<?php echo $selectedDate;?>">
|
234 |
<select name="sgpb-subscribers-dates" id="sgpb-subscribers-dates">
|
235 |
<?php
|
236 |
-
$
|
237 |
foreach ($uniqueDates as $date) {
|
238 |
if ($selectedDate == $date['date-value']) {
|
239 |
$selected = ' selected';
|
@@ -241,9 +240,12 @@ class SGPBTable extends SGPBListTable
|
|
241 |
else {
|
242 |
$selected = '';
|
243 |
}
|
244 |
-
$
|
245 |
}
|
246 |
-
|
|
|
|
|
|
|
247 |
?>
|
248 |
</select>
|
249 |
<input name="filter_action" id="post-query-submit" class="button" value="<?php _e('Filter', SG_POPUP_TEXT_DOMAIN)?>" type="submit">
|
194 |
$subscriptionPopups = SubscriptionPopup::getAllSubscriptionForms();
|
195 |
$subscribersDates = SubscriptionPopup::getAllSubscribersDate();
|
196 |
$uniqueDates = array();
|
|
|
197 |
foreach ($subscribersDates as $arr) {
|
198 |
$uniqueDates[] = $arr;
|
199 |
}
|
232 |
<input type="hidden" class="sgpb-subscribers-date" name="sgpb-subscribers-date" value="<?php echo $selectedDate;?>">
|
233 |
<select name="sgpb-subscribers-dates" id="sgpb-subscribers-dates">
|
234 |
<?php
|
235 |
+
$gotDateList = '';
|
236 |
foreach ($uniqueDates as $date) {
|
237 |
if ($selectedDate == $date['date-value']) {
|
238 |
$selected = ' selected';
|
240 |
else {
|
241 |
$selected = '';
|
242 |
}
|
243 |
+
$gotDateList .= '<option value="'.$date['date-value'].'"'.$selected.'>'.date('d F Y', strtotime($date['date-title'])).'</option>';
|
244 |
}
|
245 |
+
if (empty($subscribersDates)) {
|
246 |
+
$gotDateList = '<option value="'.$date['date-value'].'"'.$selected.'>'.__('Date', SG_POPUP_TEXT_DOMAIN).'</option>';
|
247 |
+
}
|
248 |
+
echo $dateList.$gotDateList;
|
249 |
?>
|
250 |
</select>
|
251 |
<input name="filter_action" id="post-query-submit" class="button" value="<?php _e('Filter', SG_POPUP_TEXT_DOMAIN)?>" type="submit">
|
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.0.
|
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.0.4
|
7 |
* Author: Sygnoos
|
8 |
* Author URI: https://sygnoos.com
|
9 |
* License: GPLv2
|
public/css/theme.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.sg-popup-builder-content{height:100%}.sgpb-theme-1-overlay{background:url(data:image/image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAAAAAAeW/F+AAAAOklEQVR4Ae3QIQrAUADD0Lj2AIV//5uO+RE59asKz4U177rz9VAdqkU1qAbVoBpUg2pR3V/VbrVb7QHULigVcx3ZmQAAAABJRU5ErkJggg==)}.sgpb-theme-6-overlay{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpCMEM4NDgzQjlDRTNFMTExODE4NUVDOTdFQ0I0RDgxRSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGREU5OEVCQzAzMjYxMUUyOTg5OURDMDlDRTJDMTc0RSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGREU5OEVCQjAzMjYxMUUyOTg5OURDMDlDRTJDMTc0RSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M2IChXaW5kb3dzKSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkIxQzg0ODNCOUNFM0UxMTE4MTg1RUM5N0VDQjREODFFIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkIwQzg0ODNCOUNFM0UxMTE4MTg1RUM5N0VDQjREODFFIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+s3YRAQAAABtJREFUeNpiFODh2cBABGBiIBKMKqSOQoAAAwBokQDs5F/8FAAAAABJRU5ErkJggg==)}#sgpb-popup-dialog-main-div-wrapper #sgpb-close-button{padding:0!important;color:#444!important;border:0!important;margin:0!important;overflow:visible!important;width:auto!important;background:none!important;text-shadow:0 0 2px #fff!important}#sgpb-popup-dialog-main-div-wrapper #sgpb-close-button:active{outline:0!important}.sgpb-popup-dialog-main-div-wrapper iframe{border:0!important}#popup-dialog-main-div div{margin-bottom:43px}.popup-main-wrapper div:after{background-color:#E6E5E5;content:'';display:block;position:absolute;left:5px;right:5px;bottom:5px;z-index:99999999999999999999999999999999999999999;height:43px}#content-div{border:12px solid #4B4B4B}.sgpb-theme-5-content{border-bottom:34px solid #E6E5E5!important}.sgpb-scroll-wrapper{width:100%;height:100%;overflow:hidden;-webkit-overflow-scrolling:touch}.sgpb-scroll-wrapper iframe{margin:0!important;width:1px!important;min-width:100%!important;height:100%!important}.sgpb-video-iframe-wrapper{width:100%;height:100%;overflow:hidden;-webkit-overflow-scrolling:touch}.sgpb-video-iframe-wrapper iframe{margin:0!important;width:100%;height:100%;border:0}.sgpb-video-error-message-wrapper h1{text-align:center}.sgpb-video-error-message-wrapper h3:last-child{padding:0}
|
1 |
+
.sg-popup-builder-content{height:100%}.sgpb-theme-1-overlay{background:url(data:image/image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAAAAAAeW/F+AAAAOklEQVR4Ae3QIQrAUADD0Lj2AIV//5uO+RE59asKz4U177rz9VAdqkU1qAbVoBpUg2pR3V/VbrVb7QHULigVcx3ZmQAAAABJRU5ErkJggg==)}.sgpb-theme-6-overlay{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpCMEM4NDgzQjlDRTNFMTExODE4NUVDOTdFQ0I0RDgxRSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGREU5OEVCQzAzMjYxMUUyOTg5OURDMDlDRTJDMTc0RSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGREU5OEVCQjAzMjYxMUUyOTg5OURDMDlDRTJDMTc0RSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M2IChXaW5kb3dzKSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkIxQzg0ODNCOUNFM0UxMTE4MTg1RUM5N0VDQjREODFFIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkIwQzg0ODNCOUNFM0UxMTE4MTg1RUM5N0VDQjREODFFIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+s3YRAQAAABtJREFUeNpiFODh2cBABGBiIBKMKqSOQoAAAwBokQDs5F/8FAAAAABJRU5ErkJggg==)}#sgpb-popup-dialog-main-div-wrapper #sgpb-close-button{padding:0!important;color:#444!important;border:0!important;margin:0!important;overflow:visible!important;width:auto!important;background:none!important;text-shadow:0 0 2px #fff!important}#sgpb-popup-dialog-main-div-wrapper #sgpb-close-button:active{outline:0!important}.sgpb-popup-dialog-main-div-wrapper iframe{border:0!important}#popup-dialog-main-div div{margin-bottom:43px}.popup-main-wrapper div:after{background-color:#E6E5E5;content:'';display:block;position:absolute;left:5px;right:5px;bottom:5px;z-index:99999999999999999999999999999999999999999;height:43px}#content-div{border:12px solid #4B4B4B}.sgpb-theme-5-content{border-bottom:34px solid #E6E5E5!important}.sgpb-scroll-wrapper{width:100%;height:100%;overflow:hidden;-webkit-overflow-scrolling:touch}.sgpb-scroll-wrapper iframe{margin:0!important;width:1px!important;min-width:100%!important;height:100%!important}.sgpb-video-iframe-wrapper{width:100%;height:100%;overflow:hidden;-webkit-overflow-scrolling:touch}.sgpb-video-iframe-wrapper iframe{margin:0!important;width:100%;height:100%;border:0}.sgpb-video-error-message-wrapper h1{text-align:center}.sgpb-video-error-message-wrapper h3:last-child{padding:0}#sgpb-yes-button,#sgpb-no-button{text-transform:none!important}.sg-fb-buttons-wrapper{text-align:center;min-height:25px}@media only screen and (max-width:600px){.sgpb-scroll-wrapper{overflow:auto!important}}@media (min-width:600px){.sgpb-fb-wrapper-standard{min-width:450px!important;overflow:hidden}}@media (min-width:521px) and (max-width:599px){.sgpb-fb-wrapper-standard{min-width:450px!important;overflow:scroll}#sg-facebook-like{overflow:hidden}}@media (max-width:520px){.sgpb-fb-wrapper-standard{min-width:380px!important;max-width:380px!important;overflow:hidden}.sgpb-fb-wrapper-standard .fb-like{max-width:380px!important}#sg-facebook-like{overflow:hidden}}@media (max-width:420px){.sgpb-fb-wrapper-standard{min-width:350px!important;max-width:350px!important;overflow:hidden}}@media (max-width:400px){.sgpb-fb-wrapper-standard{min-width:330px!important;max-width:330px!important;overflow:scroll}}@media (max-width:320px){.sgpb-fb-wrapper-standard{min-width:270px!important;max-width:270px!important;overflow:scroll}}.sg-hide-element{display:none}a.sg-show-popup{cursor:pointer!important}.sgpb-theme-1-content{border-radius:6px;padding-bottom:0;box-shadow:rgba(0,0,0,.6) 0 0 0 14px!important;border-bottom-width:35px!important;border-bottom-color:#fff!important}.sgpb-theme-4-content{padding-bottom:0;border-radius:7px!important;border-bottom-width:35px!important;border-bottom-color:#fff!important}.sgpb-popup-close-button-4{height:auto!important}.sgpb-popup-dialog-main-div-theme-wrapper-5{border:8px solid #555;outline:1px solid #8A8A8A;background-color:#707070}.sgpb-theme-5-content{border-radius:3px!important;box-shadow:0 0 10px #222!important}.sgpb-theme-6-content{box-shadow:#646161 0 0 8px 3px!important}.sgpb-popup-close-button-1:hover,.sgpb-popup-close-button-2:hover,.sgpb-popup-close-button-5:hover{opacity:.8}.sgpb-popup-close-button-3:hover{opacity:.9}.sgpb-popup-close-button-2{border-radius:2px}.sgpb-main-image-content-wrapper img{height:auto;max-width:100%}
|
public/js/PopupBuilder.js
CHANGED
@@ -370,6 +370,9 @@ SGPBPopup.prototype.popupLimitation = function(popupData)
|
|
370 |
}
|
371 |
/* domain level cookie saving selected */
|
372 |
else {
|
|
|
|
|
|
|
373 |
var popupLimitationPageLevelCookie = jQuery.parseJSON(popupLimitationPageLevelCookie);
|
374 |
/* if has already another saving level cookie */
|
375 |
if (popupLimitationPageLevelCookie) {
|
@@ -1685,7 +1688,9 @@ SgpbEventListener.popupObjCreator = function(currentData)
|
|
1685 |
{
|
1686 |
var popupId = currentData.data('id');
|
1687 |
var popupData = currentData.data('options');
|
1688 |
-
|
|
|
|
|
1689 |
|
1690 |
SgpbEventListener.reopenAfterFormSubmission(popupData);
|
1691 |
|
370 |
}
|
371 |
/* domain level cookie saving selected */
|
372 |
else {
|
373 |
+
if (typeof popupLimitationPageLevelCookie == 'undefined') {
|
374 |
+
popupLimitationPageLevelCookie = '';
|
375 |
+
}
|
376 |
var popupLimitationPageLevelCookie = jQuery.parseJSON(popupLimitationPageLevelCookie);
|
377 |
/* if has already another saving level cookie */
|
378 |
if (popupLimitationPageLevelCookie) {
|
1688 |
{
|
1689 |
var popupId = currentData.data('id');
|
1690 |
var popupData = currentData.data('options');
|
1691 |
+
|
1692 |
+
var events = currentData.attr('data-events');
|
1693 |
+
events = jQuery.parseJSON(events);
|
1694 |
|
1695 |
SgpbEventListener.reopenAfterFormSubmission(popupData);
|
1696 |
|
public/js/PopupConfig.js
CHANGED
@@ -6,4 +6,4 @@ String.prototype.firstToLowerCase=function()
|
|
6 |
{if(functionName.indexOf('get')!=-1){var param=functionName.replace(/^get/g,"").firstToLowerCase();return this[param];}
|
7 |
else{var param=functionName.replace(/^set/g,"").firstToLowerCase();this[param]=arrgname;}};PopupConfig.prototype.addCustomEvent=function(eventName,args)
|
8 |
{var event=document.createEvent('CustomEvent');event.initCustomEvent(eventName,true,true,args);window.dispatchEvent(event);};PopupConfig.prototype.combineConfigObj=function()
|
9 |
-
{var that=this;var eventSendArgs={'popupId':that.popupId,'popupData':that.popupData,'currentObj':that.currentObj};var config={openDelay:this.openDelay,popupTheme:this.popupTheme,closeBehavior:{allowed:this.allowed,showButton:this.showButton,buttonPosition:this.buttonPosition,buttonInside:this.buttonInside,autoclose:this.autoclose,overlayShouldClose:this.overlayShouldClose,contentShouldClose:this.contentShouldClose,escShouldClose:this.escShouldClose,right:this.closeButtonPositionRight,top:this.closeButtonPositionTop,bottom:this.closeButtonPositionBottom,left:this.closeButtonPositionLeft},openAnimation:{type:this.openAnimationEffect,speed:this.openAnimationSpeed,status:this.openAnimationStatus},closeButton:{data:this.buttonImage,width:this.closeButtonWidth,height:this.closeButtonHeight,widthType:this.closeButtonWidthType,heightType:this.closeButtonHeightType,type:this.closeButtonType,text:this.closeButtonText},overlay:{visible:this.overlayVisible,color:this.overlayColor,opacity:this.overlayOpacity,addClass:this.overlayAddClass},contentBox:{padding:this.contentPadding,zIndex:this.zIndex,showBackground:this.contentShowBackground,backgroundColor:this.contentBackgroundColor,backgroundImage:this.contentBackgroundImage,backgroundMode:this.contentBackgroundMode,borderStyle:this.contentBorderStyle,borderRadius:this.contentBorderRadius,borderRadiusType:this.contentBorderRadiusType,borderColor:this.contentBorderColor,borderWidth:this.contentBorderWidth,boxBorderWidth:this.boxBorderWidth,shadowColor:this.contentShadowColor,shadowBlur:this.contentShadowBlur,scrollingEnabled:this.scrollingEnabled,shadowSpread:this.shadowSpread,addClass:this.contentAddClass},contents:this.contents,inline:this.srcElement,iframe:false,position:{right:this.positionRight,top:this.positionTop,bottom:this.positionBottom,left:this.positionLeft},sizingRanges:[{screenFrom:{width:0,height:0},screenTo:{width:
|
6 |
{if(functionName.indexOf('get')!=-1){var param=functionName.replace(/^get/g,"").firstToLowerCase();return this[param];}
|
7 |
else{var param=functionName.replace(/^set/g,"").firstToLowerCase();this[param]=arrgname;}};PopupConfig.prototype.addCustomEvent=function(eventName,args)
|
8 |
{var event=document.createEvent('CustomEvent');event.initCustomEvent(eventName,true,true,args);window.dispatchEvent(event);};PopupConfig.prototype.combineConfigObj=function()
|
9 |
+
{var that=this;var eventSendArgs={'popupId':that.popupId,'popupData':that.popupData,'currentObj':that.currentObj};var config={openDelay:this.openDelay,popupTheme:this.popupTheme,closeBehavior:{allowed:this.allowed,showButton:this.showButton,buttonPosition:this.buttonPosition,buttonInside:this.buttonInside,autoclose:this.autoclose,overlayShouldClose:this.overlayShouldClose,contentShouldClose:this.contentShouldClose,escShouldClose:this.escShouldClose,right:this.closeButtonPositionRight,top:this.closeButtonPositionTop,bottom:this.closeButtonPositionBottom,left:this.closeButtonPositionLeft},openAnimation:{type:this.openAnimationEffect,speed:this.openAnimationSpeed,status:this.openAnimationStatus},closeButton:{data:this.buttonImage,width:this.closeButtonWidth,height:this.closeButtonHeight,widthType:this.closeButtonWidthType,heightType:this.closeButtonHeightType,type:this.closeButtonType,text:this.closeButtonText},overlay:{visible:this.overlayVisible,color:this.overlayColor,opacity:this.overlayOpacity,addClass:this.overlayAddClass},contentBox:{padding:this.contentPadding,zIndex:this.zIndex,showBackground:this.contentShowBackground,backgroundColor:this.contentBackgroundColor,backgroundImage:this.contentBackgroundImage,backgroundMode:this.contentBackgroundMode,borderStyle:this.contentBorderStyle,borderRadius:this.contentBorderRadius,borderRadiusType:this.contentBorderRadiusType,borderColor:this.contentBorderColor,borderWidth:this.contentBorderWidth,boxBorderWidth:this.boxBorderWidth,shadowColor:this.contentShadowColor,shadowBlur:this.contentShadowBlur,scrollingEnabled:this.scrollingEnabled,shadowSpread:this.shadowSpread,addClass:this.contentAddClass},contents:this.contents,inline:this.srcElement,iframe:false,position:{right:this.positionRight,top:this.positionTop,bottom:this.positionBottom,left:this.positionLeft},sizingRanges:[{screenFrom:{width:0,height:0},screenTo:{width:320,height:3000},width:'100%',height:this.height,maxWidth:this.maxWidth,maxHeight:this.maxHeight,minWidth:this.minWidth,minHeight:this.minHeight},{screenFrom:{width:320,height:0},screenTo:{width:3000,height:3000},width:this.width,height:this.height,maxWidth:this.maxWidth,maxHeight:this.maxHeight,minWidth:this.minWidth,minHeight:this.minHeight}],shouldOpen:function(){that.addCustomEvent('sgpbShouldOpen',eventSendArgs);return true;},willOpen:function(){that.addCustomEvent('sgpbWillOpen',eventSendArgs);},didOpen:function(){that.addCustomEvent('sgpbDidOpen',eventSendArgs);},shouldClose:function(){that.addCustomEvent('sgpbShouldClose',eventSendArgs);return true;},willClose:function(){that.addCustomEvent('sgpbWillClose',eventSendArgs);},didClose:function(){that.addCustomEvent('sgpbDidClose',eventSendArgs);}};return config;};var obj=new PopupConfig();
|
readme.txt
CHANGED
@@ -166,6 +166,15 @@ Go to the Popup Builder settings and set your desired options.
|
|
166 |
|
167 |
== Changelog ==
|
168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
= Version 3.0.3 =
|
170 |
* Bug fixed connected to update from v2 to v3 when popups disappear.
|
171 |
* Compatability with old popup (v2) classes. Example sg-popup-id-1.
|
166 |
|
167 |
== Changelog ==
|
168 |
|
169 |
+
= Version 3.0.4 =
|
170 |
+
* Seo redirect for popup post types (301).
|
171 |
+
* CSS class support for popup opening.
|
172 |
+
* Added new condition to show popup sitewide.
|
173 |
+
* Bug fixed conencted to scrolling inside the Safari browser.
|
174 |
+
* Bug fixed inside the subscribers' table for invalid dates.
|
175 |
+
* Popup sizing improvements.
|
176 |
+
* Bug fixed connected to content scroling option.
|
177 |
+
|
178 |
= Version 3.0.3 =
|
179 |
* Bug fixed connected to update from v2 to v3 when popups disappear.
|
180 |
* Compatability with old popup (v2) classes. Example sg-popup-id-1.
|