Version Description
Current Version of Popup Builder is 3.1
Download this release
Release Info
Developer | Sygnoos |
Plugin | Popup Builder – Responsive WordPress Pop up |
Version | 3.1.1 |
Comparing to | |
See all releases |
Code changes from version 3.1 to 3.1.1
- com/classes/Actions.php +14 -3
- com/classes/Ajax.php +43 -0
- com/classes/extension/SgpbPopupExtension.php +9 -11
- com/classes/popups/SubscriptionPopup.php +1 -0
- com/config/config.php +5 -2
- com/config/configPackage.php +1 -1
- com/config/dataConfig.php +6 -0
- com/helpers/AdminHelper.php +57 -0
- popup-builder.php +1 -1
- public/css/popupAdminStyles.css +32 -2
- public/img/registrationTypeIcon.png +0 -0
- public/js/Backend.js +10 -2
- public/js/PopupBuilder.js +115 -7
- public/views/emailTemplates/takeReviewAfterSubscribe.html +206 -0
- public/views/mainRateUsBanner.php +7 -8
- readme.txt +12 -1
com/classes/Actions.php
CHANGED
@@ -38,6 +38,7 @@ class Actions
|
|
38 |
add_shortcode('sg_popup', array($this, 'popupShortcode'));
|
39 |
add_filter('cron_schedules', array($this, 'cronAddMinutes'), 10, 1);
|
40 |
add_action('sgpb_send_newsletter', array($this, 'newsletterSendEmail'), 10, 1);
|
|
|
41 |
add_action('admin_post_sgpbSaveSettings', array($this, 'saveSettings'), 10, 1);
|
42 |
add_action('admin_init', array($this, 'disableAutosave'));
|
43 |
add_action('admin_init', array($this, 'userRolesCaps'));
|
@@ -50,14 +51,24 @@ class Actions
|
|
50 |
// for change admin popup list order
|
51 |
add_action('pre_get_posts', array($this, 'preGetPosts'));
|
52 |
add_action('template_redirect',array($this, 'redirectFromPopupPage'));
|
53 |
-
|
54 |
-
|
55 |
add_filter('views_edit-popupbuilder', array($this, 'mainActionButtons'), 10, 1);
|
56 |
new Ajax();
|
57 |
}
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
public function wpInit()
|
60 |
{
|
|
|
|
|
|
|
|
|
61 |
new Updates();
|
62 |
}
|
63 |
|
@@ -143,7 +154,7 @@ class Actions
|
|
143 |
{
|
144 |
global $post_type;
|
145 |
|
146 |
-
if (!get_option('SGPB_PROMOTIONAL_BANNER_CLOSED')
|
147 |
require_once(SG_POPUP_VIEWS_PATH.'mainRateUsBanner.php');
|
148 |
}
|
149 |
|
38 |
add_shortcode('sg_popup', array($this, 'popupShortcode'));
|
39 |
add_filter('cron_schedules', array($this, 'cronAddMinutes'), 10, 1);
|
40 |
add_action('sgpb_send_newsletter', array($this, 'newsletterSendEmail'), 10, 1);
|
41 |
+
add_action('sgpbGetBannerContent', array($this, 'getBannerContent'), 10, 1);
|
42 |
add_action('admin_post_sgpbSaveSettings', array($this, 'saveSettings'), 10, 1);
|
43 |
add_action('admin_init', array($this, 'disableAutosave'));
|
44 |
add_action('admin_init', array($this, 'userRolesCaps'));
|
51 |
// for change admin popup list order
|
52 |
add_action('pre_get_posts', array($this, 'preGetPosts'));
|
53 |
add_action('template_redirect',array($this, 'redirectFromPopupPage'));
|
|
|
|
|
54 |
add_filter('views_edit-popupbuilder', array($this, 'mainActionButtons'), 10, 1);
|
55 |
new Ajax();
|
56 |
}
|
57 |
|
58 |
+
public function getBannerContent()
|
59 |
+
{
|
60 |
+
$bannerContent = AdminHelper::getFileFromURL(SGPB_BANNER_CRON_TEXT_URL);
|
61 |
+
update_option('sgpb-banner-remote-get', $bannerContent);
|
62 |
+
|
63 |
+
return $banner;
|
64 |
+
}
|
65 |
+
|
66 |
public function wpInit()
|
67 |
{
|
68 |
+
if (!get_option('sgpb-banner-cron-once')) {
|
69 |
+
update_option('sgpb-banner-cron-once', 1);
|
70 |
+
wp_schedule_event(time(), 'daily', 'sgpbGetBannerContent');
|
71 |
+
}
|
72 |
new Updates();
|
73 |
}
|
74 |
|
154 |
{
|
155 |
global $post_type;
|
156 |
|
157 |
+
if (!get_option('SGPB_PROMOTIONAL_BANNER_CLOSED')) {
|
158 |
require_once(SG_POPUP_VIEWS_PATH.'mainRateUsBanner.php');
|
159 |
}
|
160 |
|
com/classes/Ajax.php
CHANGED
@@ -362,6 +362,12 @@ class Ajax
|
|
362 |
}
|
363 |
|
364 |
if ($res) {
|
|
|
|
|
|
|
|
|
|
|
|
|
365 |
$status = SGPB_AJAX_STATUS_TRUE;
|
366 |
}
|
367 |
|
@@ -369,6 +375,43 @@ class Ajax
|
|
369 |
wp_die();
|
370 |
}
|
371 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
public function select2SearchData()
|
373 |
{
|
374 |
check_ajax_referer(SG_AJAX_NONCE, 'nonce_ajax');
|
362 |
}
|
363 |
|
364 |
if ($res) {
|
365 |
+
$userData = array(
|
366 |
+
'email' => $email,
|
367 |
+
'firstName' => $firstName,
|
368 |
+
'lastName' => $lastName
|
369 |
+
);
|
370 |
+
$sendEmails = $this->sendSuccessEmails($popupPostId, $userData);
|
371 |
$status = SGPB_AJAX_STATUS_TRUE;
|
372 |
}
|
373 |
|
375 |
wp_die();
|
376 |
}
|
377 |
|
378 |
+
private function sendSuccessEmails($popupPostId, $subscriptionDetails)
|
379 |
+
{
|
380 |
+
global $wpdb;
|
381 |
+
$popup = SGPopup::find($popupPostId);
|
382 |
+
|
383 |
+
if (!is_object($popup)) {
|
384 |
+
return false;
|
385 |
+
}
|
386 |
+
$subscribersTableName = $wpdb->prefix.SGPB_SUBSCRIBERS_TABLE_NAME;
|
387 |
+
|
388 |
+
$getSubscriberCountQuery = $wpdb->prepare('SELECT COUNT(id) as countIds FROM '.$subscribersTableName.' WHERE subscriptionType = %d', $popupPostId);
|
389 |
+
$count = $wpdb->get_row($getSubscriberCountQuery, ARRAY_A);
|
390 |
+
|
391 |
+
$popupOptions = $popup->getOptions();
|
392 |
+
$adminUserName = 'admin';
|
393 |
+
|
394 |
+
$adminEmail = get_option('admin_email');
|
395 |
+
$userData = @get_user_by_email($adminEmail);
|
396 |
+
|
397 |
+
if (!empty($userData)) {
|
398 |
+
$adminUserName = $userData->display_name;
|
399 |
+
}
|
400 |
+
|
401 |
+
$notificationEmail = $popupOptions['sgpb-subs-notifications-email'];
|
402 |
+
$newSubscriberEmailHeader = AdminHelper::getEmailHeader($notificationEmail);
|
403 |
+
$takeReviewAfterFirstSubscription = get_option('sgpb-new-subscriber');
|
404 |
+
|
405 |
+
if ($count['countIds'] == 1 && !empty($popupOptions['sgpb-subs-enable-email-notifications']) && !$takeReviewAfterFirstSubscription) {
|
406 |
+
// take review
|
407 |
+
update_option('sgpb-new-subscriber', 1);
|
408 |
+
$newSubscriberEmailTitle = __('Congrats! You have already 1 subscriber!', SG_POPUP_TEXT_DOMAIN);
|
409 |
+
$reviewEmailTemplate = AdminHelper::getFileFromURL(SG_POPUP_EMAIL_TEMPLATES_URL.'takeReviewAfterSubscribe.html');
|
410 |
+
$reviewEmailTemplate = preg_replace('/\[adminUserName]/', $adminUserName, $reviewEmailTemplate);
|
411 |
+
$sendStatus = wp_mail($notificationEmail, $newSubscriberEmailTitle, $reviewEmailTemplate, $newSubscriberEmailHeader); //return true or false
|
412 |
+
}
|
413 |
+
}
|
414 |
+
|
415 |
public function select2SearchData()
|
416 |
{
|
417 |
check_ajax_referer(SG_AJAX_NONCE, 'nonce_ajax');
|
com/classes/extension/SgpbPopupExtension.php
CHANGED
@@ -50,7 +50,15 @@ class SgpbPopupExtension implements SgpbIPopupExtension
|
|
50 |
if ($pageName == $newsletterPage) {
|
51 |
$jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'Newsletter.js');
|
52 |
}
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
if (in_array($pageName, $allowPages)) {
|
55 |
$jsFiles[] = array('folderUrl'=> '', 'filename' => 'wp-color-picker');
|
56 |
$jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'select2.min.js', 'dep' => '', 'ver' => '3.86', 'inFooter' => '');
|
@@ -60,7 +68,6 @@ class SgpbPopupExtension implements SgpbIPopupExtension
|
|
60 |
$jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'Backend.js');
|
61 |
$jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'Popup.js');
|
62 |
$jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'PopupConfig.js');
|
63 |
-
$jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'Banner.js');
|
64 |
|
65 |
$localizeData[] = array(
|
66 |
'handle' => 'Backend.js',
|
@@ -90,15 +97,6 @@ class SgpbPopupExtension implements SgpbIPopupExtension
|
|
90 |
)
|
91 |
);
|
92 |
|
93 |
-
$localizeData[] = array(
|
94 |
-
'handle' => 'Banner.js',
|
95 |
-
'name' => 'SGPB_JS_PARAMS',
|
96 |
-
'data' => array(
|
97 |
-
'url' => admin_url('admin-ajax.php'),
|
98 |
-
'nonce' => wp_create_nonce(SG_AJAX_NONCE)
|
99 |
-
)
|
100 |
-
);
|
101 |
-
|
102 |
$localizeData[] = array(
|
103 |
'handle' => 'Backend.js',
|
104 |
'name' => 'SGPB_JS_LOCALIZATION',
|
50 |
if ($pageName == $newsletterPage) {
|
51 |
$jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'Newsletter.js');
|
52 |
}
|
53 |
+
$jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'Banner.js', 'dep' => array('jquery'));
|
54 |
+
$localizeData[] = array(
|
55 |
+
'handle' => 'Banner.js',
|
56 |
+
'name' => 'SGPB_JS_PARAMS',
|
57 |
+
'data' => array(
|
58 |
+
'url' => admin_url('admin-ajax.php'),
|
59 |
+
'nonce' => wp_create_nonce(SG_AJAX_NONCE)
|
60 |
+
)
|
61 |
+
);
|
62 |
if (in_array($pageName, $allowPages)) {
|
63 |
$jsFiles[] = array('folderUrl'=> '', 'filename' => 'wp-color-picker');
|
64 |
$jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'select2.min.js', 'dep' => '', 'ver' => '3.86', 'inFooter' => '');
|
68 |
$jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'Backend.js');
|
69 |
$jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'Popup.js');
|
70 |
$jsFiles[] = array('folderUrl'=> SG_POPUP_JS_URL, 'filename' => 'PopupConfig.js');
|
|
|
71 |
|
72 |
$localizeData[] = array(
|
73 |
'handle' => 'Backend.js',
|
97 |
)
|
98 |
);
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
$localizeData[] = array(
|
101 |
'handle' => 'Backend.js',
|
102 |
'name' => 'SGPB_JS_LOCALIZATION',
|
com/classes/popups/SubscriptionPopup.php
CHANGED
@@ -41,6 +41,7 @@ class SubscriptionPopup extends SGPopup
|
|
41 |
`subscriptionType` int(12),
|
42 |
`cDate` date,
|
43 |
`status` varchar(255),
|
|
|
44 |
PRIMARY KEY (id)
|
45 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;';
|
46 |
|
41 |
`subscriptionType` int(12),
|
42 |
`cDate` date,
|
43 |
`status` varchar(255),
|
44 |
+
`unsubscribed` int(11) default 0,
|
45 |
PRIMARY KEY (id)
|
46 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;';
|
47 |
|
com/config/config.php
CHANGED
@@ -34,8 +34,8 @@ class SgpbPopupConfig
|
|
34 |
self::addDefine('SG_POPUP_VIDEO_URL', 'https://popup-builder.com/downloads/video/');
|
35 |
self::addDefine('SG_POPUP_SOCIAL_URL', 'https://popup-builder.com/downloads/social/');
|
36 |
self::addDefine('SG_POPUP_COUNTDOWN_URL', 'https://popup-builder.com/downloads/countdown/');
|
37 |
-
self::addDefine('SG_POPUP_RESTRICTION_URL', 'https://popup-builder.com/downloads/restriction/');
|
38 |
-
self::addDefine('SG_POPUP_CONTACT_FORM_URL', 'https://popup-builder.com/downloads/contact-
|
39 |
self::addDefine('SG_POPUP_INACTIVITY_URL', 'https://popup-builder.com/downloads/inactivity/');
|
40 |
self::addDefine('SG_POPUP_SCHEDULING_URL', 'https://popup-builder.com/downloads/scheduling/');
|
41 |
self::addDefine('SG_POPUP_GEO_TARGETING_URL', 'https://popup-builder.com/downloads/geo-targeting/');
|
@@ -44,6 +44,7 @@ class SgpbPopupConfig
|
|
44 |
self::addDefine('SG_POPUP_ADVANCED_TARGETING_URL', 'https://popup-builder.com/downloads/advanced-targeting/');
|
45 |
self::addDefine('SG_POPUP_ALL_EXTENSIONS_URL', 'https://popup-builder.com/downloads/category/extensions/');
|
46 |
self::addDefine('SG_POPUP_LOGIN_URL', 'https://popup-builder.com/downloads/login-popup/');
|
|
|
47 |
self::addDefine('SG_POPUP_ADMIN_URL', admin_url());
|
48 |
self::addDefine('SG_POPUP_BUILDER_URL', plugins_url().'/'.SG_POPUP_FOLDER_NAME.'/');
|
49 |
self::addDefine('SG_POPUP_BUILDER_PATH', WP_PLUGIN_DIR.'/'.SG_POPUP_FOLDER_NAME.'/');
|
@@ -66,6 +67,7 @@ class SgpbPopupConfig
|
|
66 |
self::addDefine('SG_POPUP_CSS_URL', SG_POPUP_PUBLIC_URL.'css/');
|
67 |
self::addDefine('SG_POPUP_IMG_URL', SG_POPUP_PUBLIC_URL.'img/');
|
68 |
self::addDefine('SG_POPUP_SOUND_URL', SG_POPUP_PUBLIC_URL.'sound/');
|
|
|
69 |
self::addDefine('SG_POPUP_DEFAULT_TIME_ZONE', 'UTC');
|
70 |
self::addDefine('SG_POPUP_CATEGORY_TAXONOMY', 'popup-categories');
|
71 |
self::addDefine('SG_POPUP_MINIMUM_PHP_VERSION', '5.3.3');
|
@@ -88,6 +90,7 @@ class SgpbPopupConfig
|
|
88 |
self::addDefine('SGPB_APP_POPUP_TABLE_LIMIT', 15);
|
89 |
self::addDefine('SGPB_SUBSCRIBERS_ERROR_TABLE_NAME', 'sgpb_subscription_error_log');
|
90 |
self::addDefine('SGPB_CRON_REPEAT_INTERVAL', 1);
|
|
|
91 |
self::addDefine('SGPB_FACEBOOK_APP_ID', 1725074220856984);
|
92 |
self::addDefine('SGPB_POPUP_TYPE_RESTRICTION', 'ageRestriction');
|
93 |
self::addDefine('SGPB_POPUP_DEFAULT_SOUND', 'popupOpenSound.wav');
|
34 |
self::addDefine('SG_POPUP_VIDEO_URL', 'https://popup-builder.com/downloads/video/');
|
35 |
self::addDefine('SG_POPUP_SOCIAL_URL', 'https://popup-builder.com/downloads/social/');
|
36 |
self::addDefine('SG_POPUP_COUNTDOWN_URL', 'https://popup-builder.com/downloads/countdown/');
|
37 |
+
self::addDefine('SG_POPUP_RESTRICTION_URL', 'https://popup-builder.com/downloads/age-restriction-popup/');
|
38 |
+
self::addDefine('SG_POPUP_CONTACT_FORM_URL', 'https://popup-builder.com/downloads/contact-popup/');
|
39 |
self::addDefine('SG_POPUP_INACTIVITY_URL', 'https://popup-builder.com/downloads/inactivity/');
|
40 |
self::addDefine('SG_POPUP_SCHEDULING_URL', 'https://popup-builder.com/downloads/scheduling/');
|
41 |
self::addDefine('SG_POPUP_GEO_TARGETING_URL', 'https://popup-builder.com/downloads/geo-targeting/');
|
44 |
self::addDefine('SG_POPUP_ADVANCED_TARGETING_URL', 'https://popup-builder.com/downloads/advanced-targeting/');
|
45 |
self::addDefine('SG_POPUP_ALL_EXTENSIONS_URL', 'https://popup-builder.com/downloads/category/extensions/');
|
46 |
self::addDefine('SG_POPUP_LOGIN_URL', 'https://popup-builder.com/downloads/login-popup/');
|
47 |
+
self::addDefine('SG_POPUP_REGISTRATION_URL', 'https://popup-builder.com/downloads/registration-popup/');
|
48 |
self::addDefine('SG_POPUP_ADMIN_URL', admin_url());
|
49 |
self::addDefine('SG_POPUP_BUILDER_URL', plugins_url().'/'.SG_POPUP_FOLDER_NAME.'/');
|
50 |
self::addDefine('SG_POPUP_BUILDER_PATH', WP_PLUGIN_DIR.'/'.SG_POPUP_FOLDER_NAME.'/');
|
67 |
self::addDefine('SG_POPUP_CSS_URL', SG_POPUP_PUBLIC_URL.'css/');
|
68 |
self::addDefine('SG_POPUP_IMG_URL', SG_POPUP_PUBLIC_URL.'img/');
|
69 |
self::addDefine('SG_POPUP_SOUND_URL', SG_POPUP_PUBLIC_URL.'sound/');
|
70 |
+
self::addDefine('SG_POPUP_VIEWS_URL', SG_POPUP_PUBLIC_URL.'views/');
|
71 |
self::addDefine('SG_POPUP_DEFAULT_TIME_ZONE', 'UTC');
|
72 |
self::addDefine('SG_POPUP_CATEGORY_TAXONOMY', 'popup-categories');
|
73 |
self::addDefine('SG_POPUP_MINIMUM_PHP_VERSION', '5.3.3');
|
90 |
self::addDefine('SGPB_APP_POPUP_TABLE_LIMIT', 15);
|
91 |
self::addDefine('SGPB_SUBSCRIBERS_ERROR_TABLE_NAME', 'sgpb_subscription_error_log');
|
92 |
self::addDefine('SGPB_CRON_REPEAT_INTERVAL', 1);
|
93 |
+
self::addDefine('SGPB_BANNER_CRON_TEXT_URL', 'https://popup-builder.com/sgpb-banner.php');
|
94 |
self::addDefine('SGPB_FACEBOOK_APP_ID', 1725074220856984);
|
95 |
self::addDefine('SGPB_POPUP_TYPE_RESTRICTION', 'ageRestriction');
|
96 |
self::addDefine('SGPB_POPUP_DEFAULT_SOUND', 'popupOpenSound.wav');
|
com/config/configPackage.php
CHANGED
@@ -3,6 +3,6 @@ if (!defined('ABSPATH')) {
|
|
3 |
exit();
|
4 |
}
|
5 |
|
6 |
-
define('SG_POPUP_VERSION', '3.1');
|
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.1.1');
|
7 |
define('SGPB_POPUP_PKG', SGPB_POPUP_PKG_FREE);
|
8 |
define('POPUP_BUILDER_BASENAME', 'popupbuilder-platinum/popup-builder.php');
|
com/config/dataConfig.php
CHANGED
@@ -611,6 +611,12 @@ class SgpbDataConfig
|
|
611 |
'key' => 'login',
|
612 |
'url' => SG_POPUP_LOGIN_URL
|
613 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
614 |
|
615 |
return apply_filters('sgpbExtensionsKeys', $keys);
|
616 |
}
|
611 |
'key' => 'login',
|
612 |
'url' => SG_POPUP_LOGIN_URL
|
613 |
);
|
614 |
+
$keys[] = array(
|
615 |
+
'label' => __('Registration', SG_POPUP_TEXT_DOMAIN),
|
616 |
+
'pluginKey' => 'popupbuilder-registration/PopupBuilderRegistration.php',
|
617 |
+
'key' => 'registration',
|
618 |
+
'url' => SG_POPUP_REGISTRATION_URL
|
619 |
+
);
|
620 |
|
621 |
return apply_filters('sgpbExtensionsKeys', $keys);
|
622 |
}
|
com/helpers/AdminHelper.php
CHANGED
@@ -1318,4 +1318,61 @@ class AdminHelper
|
|
1318 |
|
1319 |
return $popupContent;
|
1320 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1321 |
}
|
1318 |
|
1319 |
return $popupContent;
|
1320 |
}
|
1321 |
+
|
1322 |
+
/**
|
1323 |
+
* Get email headers
|
1324 |
+
*
|
1325 |
+
* @since 3.1.0
|
1326 |
+
*
|
1327 |
+
* @param email $fromEmail
|
1328 |
+
* @param array $args
|
1329 |
+
*
|
1330 |
+
* @return string $headers
|
1331 |
+
*/
|
1332 |
+
public static function getEmailHeader($fromEmail, $args = array())
|
1333 |
+
{
|
1334 |
+
$contentType = 'text/html';
|
1335 |
+
$charset = 'UTF-8';
|
1336 |
+
|
1337 |
+
if (!empty($args['contentType'])) {
|
1338 |
+
$contentType = $args['contentType'];
|
1339 |
+
}
|
1340 |
+
if (!empty($args['charset'])) {
|
1341 |
+
$charset = $args['charset'];
|
1342 |
+
}
|
1343 |
+
$headers = 'MIME-Version: 1.0'."\r\n";
|
1344 |
+
$headers .= 'From: '.$fromEmail."\r\n";
|
1345 |
+
$headers .= 'Content-type: '.$contentType.'; charset='.$charset.''."\r\n"; //set UTF-8
|
1346 |
+
|
1347 |
+
return $headers;
|
1348 |
+
}
|
1349 |
+
|
1350 |
+
/**
|
1351 |
+
* Get file content from URL
|
1352 |
+
*
|
1353 |
+
* @since 3.1.0
|
1354 |
+
*
|
1355 |
+
* @param $url
|
1356 |
+
*
|
1357 |
+
* @return string
|
1358 |
+
*/
|
1359 |
+
public static function getFileFromURL($url)
|
1360 |
+
{
|
1361 |
+
$data = '';
|
1362 |
+
$remoteData = wp_remote_get($url);
|
1363 |
+
|
1364 |
+
if (is_wp_error($remoteData)) {
|
1365 |
+
return $data;
|
1366 |
+
}
|
1367 |
+
|
1368 |
+
$data = wp_remote_retrieve_body($remoteData);
|
1369 |
+
|
1370 |
+
return $data;
|
1371 |
+
}
|
1372 |
+
|
1373 |
+
public static function getBannerText()
|
1374 |
+
{
|
1375 |
+
$bannerText = get_option('sgpb-banner-remote-get');
|
1376 |
+
return $bannerText;
|
1377 |
+
}
|
1378 |
}
|
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.1
|
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.1.1
|
7 |
* Author: Sygnoos
|
8 |
* Author URI: https://sygnoos.com
|
9 |
* License: GPLv2
|
public/css/popupAdminStyles.css
CHANGED
@@ -467,11 +467,28 @@
|
|
467 |
background-color: #87ddd9 !important;
|
468 |
}
|
469 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
470 |
.login-popup-pro,
|
471 |
.login-popup {
|
472 |
background-image: url("../img/loginTypeIcon.png") !important;
|
473 |
}
|
474 |
|
|
|
|
|
|
|
|
|
|
|
475 |
.sgpbMailchimp-popup-pro,
|
476 |
.mailchimp-popup {
|
477 |
background-image: url("../img/mailchimpTypeIcon.png") !important;
|
@@ -497,6 +514,11 @@
|
|
497 |
background-image: url("../img/adBlockTypeIcon.png") !important;
|
498 |
}
|
499 |
|
|
|
|
|
|
|
|
|
|
|
500 |
.sgpb-sgpbAdBlock-div {
|
501 |
background-color: rgba(249, 61, 62, 0.4);
|
502 |
}
|
@@ -1272,6 +1294,7 @@ input:checked + .sgpb-slider:before {
|
|
1272 |
}
|
1273 |
|
1274 |
.sgpb-box-target .sgpb-event-row:not(:first-child),
|
|
|
1275 |
.sgpb-box-conditions .sgpb-event-row:not(:first-child),
|
1276 |
.sgpb-box-events .sgpb-event-row:not(:first-child) {
|
1277 |
border-top: 1px dashed #ccc;
|
@@ -1279,6 +1302,10 @@ input:checked + .sgpb-slider:before {
|
|
1279 |
padding-top: 10px
|
1280 |
}
|
1281 |
|
|
|
|
|
|
|
|
|
1282 |
.col-md-2.sg-rules-edit-button-wrapper {
|
1283 |
max-width: 144px;
|
1284 |
}
|
@@ -1901,7 +1928,10 @@ input:checked + .sgpb-slider:before {
|
|
1901 |
}
|
1902 |
|
1903 |
.sgpb-rate-us-banner-2 {
|
1904 |
-
background-image: url(../img/rateUsBanner2.png)
|
|
|
|
|
|
|
1905 |
}
|
1906 |
|
1907 |
.sgpb-rate-us-banner-3 {
|
@@ -2034,4 +2064,4 @@ input:checked + .sgpb-slider:before {
|
|
2034 |
.sgpb-import-wrapper .submit {
|
2035 |
float: none !important;
|
2036 |
padding: 0 !important;
|
2037 |
-
}
|
467 |
background-color: #87ddd9 !important;
|
468 |
}
|
469 |
|
470 |
+
.sgpb-registration-div {
|
471 |
+
background-color: #fe415b !important;
|
472 |
+
}
|
473 |
+
|
474 |
+
.sgpb-registration-div:hover {
|
475 |
+
background-color: #fe5a70 !important;
|
476 |
+
}
|
477 |
+
|
478 |
+
.sgpb-extensions-wrapper .sgpb-registration-div {
|
479 |
+
background-color: rgb(254, 65, 91, 0.4) !important;
|
480 |
+
}
|
481 |
+
|
482 |
.login-popup-pro,
|
483 |
.login-popup {
|
484 |
background-image: url("../img/loginTypeIcon.png") !important;
|
485 |
}
|
486 |
|
487 |
+
.registration-popup-pro,
|
488 |
+
.registration-popup {
|
489 |
+
background-image: url("../img/registrationTypeIcon.png") !important;
|
490 |
+
}
|
491 |
+
|
492 |
.sgpbMailchimp-popup-pro,
|
493 |
.mailchimp-popup {
|
494 |
background-image: url("../img/mailchimpTypeIcon.png") !important;
|
514 |
background-image: url("../img/adBlockTypeIcon.png") !important;
|
515 |
}
|
516 |
|
517 |
+
.sgpb-sgpbAdBlock-div {
|
518 |
+
background-color: rgba(249, 61, 62, 0.4);
|
519 |
+
}
|
520 |
+
|
521 |
+
|
522 |
.sgpb-sgpbAdBlock-div {
|
523 |
background-color: rgba(249, 61, 62, 0.4);
|
524 |
}
|
1294 |
}
|
1295 |
|
1296 |
.sgpb-box-target .sgpb-event-row:not(:first-child),
|
1297 |
+
.sgpb-box-woocommerce-special-events .sgpb-event-row:not(:first-child),
|
1298 |
.sgpb-box-conditions .sgpb-event-row:not(:first-child),
|
1299 |
.sgpb-box-events .sgpb-event-row:not(:first-child) {
|
1300 |
border-top: 1px dashed #ccc;
|
1302 |
padding-top: 10px
|
1303 |
}
|
1304 |
|
1305 |
+
.sgpb-box-woocommerce-special-events .sgpb-event-row:not(:last-child) .sg-rules-add-button-wrapper.sgpb-static-padding-top {
|
1306 |
+
display: none;
|
1307 |
+
}
|
1308 |
+
|
1309 |
.col-md-2.sg-rules-edit-button-wrapper {
|
1310 |
max-width: 144px;
|
1311 |
}
|
1928 |
}
|
1929 |
|
1930 |
.sgpb-rate-us-banner-2 {
|
1931 |
+
/*background-image: url(../img/rateUsBanner2.png);*/
|
1932 |
+
background-color: #00c4ee;
|
1933 |
+
border-top: 1px solid #2b2744;
|
1934 |
+
border-bottom: 1px solid #2b2744;
|
1935 |
}
|
1936 |
|
1937 |
.sgpb-rate-us-banner-3 {
|
2064 |
.sgpb-import-wrapper .submit {
|
2065 |
float: none !important;
|
2066 |
padding: 0 !important;
|
2067 |
+
}
|
public/img/registrationTypeIcon.png
ADDED
Binary file
|
public/js/Backend.js
CHANGED
@@ -675,6 +675,12 @@ SGPBBackend.prototype.changeConditionParams = function()
|
|
675 |
var paramValue = currentTargetDiv.find('.sg-condition-param-wrapper select').first().val();
|
676 |
var ruleId = 0;
|
677 |
var groupId = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
678 |
|
679 |
var data = {
|
680 |
action: 'change_condition_rule_row',
|
@@ -692,6 +698,9 @@ SGPBBackend.prototype.changeConditionParams = function()
|
|
692 |
currentTargetDiv.find('.sg-target-rule-'+ruleId).first().remove();
|
693 |
|
694 |
that.reInitRulesConfigButton();
|
|
|
|
|
|
|
695 |
});
|
696 |
});
|
697 |
});
|
@@ -899,7 +908,7 @@ SGPBBackend.prototype.popupThemesPreview = function()
|
|
899 |
SGPBBackend.prototype.rangeSlider = function()
|
900 |
{
|
901 |
if (typeof Powerange != 'undefined') {
|
902 |
-
var powerRangeSelectors = ['js-popup-overlay-opacity', 'js-popup-content-opacity', 'js-subs-bg-opacity', 'js-contact-bg-opacity', 'js-login-bg-opacity'];
|
903 |
|
904 |
for (var i in powerRangeSelectors) {
|
905 |
if (typeof powerRangeSelectors[i] != 'string') {
|
@@ -925,7 +934,6 @@ SGPBBackend.prototype.powerRange = function(cssSelectorName)
|
|
925 |
jQuery('#' + cssSelectorName).attr('data-init', true);
|
926 |
var initDec = new Powerange(dec, { decimal: true, callback: displayDecimalValue, max: 1, start: jQuery('.' + cssSelectorName).attr('value') });
|
927 |
}
|
928 |
-
|
929 |
};
|
930 |
|
931 |
SGPBBackend.prototype.backgroundRangeSliderInit = function()
|
675 |
var paramValue = currentTargetDiv.find('.sg-condition-param-wrapper select').first().val();
|
676 |
var ruleId = 0;
|
677 |
var groupId = 0;
|
678 |
+
var prevRuleDiv = jQuery(this).parents('.sg-target-rule').first();
|
679 |
+
var currentGroupDiv = jQuery(this).parents('.sg-target-group').first();
|
680 |
+
var currentTargetDiv = jQuery(this).parents('.popup-conditions-wrapper').first();
|
681 |
+
|
682 |
+
var groupId = parseInt(currentGroupDiv.attr('data-group-id'));
|
683 |
+
var ruleId = parseInt(prevRuleDiv.attr('data-rule-id'));
|
684 |
|
685 |
var data = {
|
686 |
action: 'change_condition_rule_row',
|
698 |
currentTargetDiv.find('.sg-target-rule-'+ruleId).first().remove();
|
699 |
|
700 |
that.reInitRulesConfigButton();
|
701 |
+
if (currentTargetDiv.find('.sg-target-rule-'+ruleId).next().length) {
|
702 |
+
jQuery('.popup-conditions-'+conditionName+' > .sg-target-group-'+groupId+' .sg-target-rule-'+ruleId+' .sg-rules-add-button-wrapper').hide();
|
703 |
+
}
|
704 |
});
|
705 |
});
|
706 |
});
|
908 |
SGPBBackend.prototype.rangeSlider = function()
|
909 |
{
|
910 |
if (typeof Powerange != 'undefined') {
|
911 |
+
var powerRangeSelectors = ['js-popup-overlay-opacity', 'js-popup-content-opacity', 'js-subs-bg-opacity', 'js-contact-bg-opacity', 'js-login-bg-opacity', 'js-registration-bg-opacity'];
|
912 |
|
913 |
for (var i in powerRangeSelectors) {
|
914 |
if (typeof powerRangeSelectors[i] != 'string') {
|
934 |
jQuery('#' + cssSelectorName).attr('data-init', true);
|
935 |
var initDec = new Powerange(dec, { decimal: true, callback: displayDecimalValue, max: 1, start: jQuery('.' + cssSelectorName).attr('value') });
|
936 |
}
|
|
|
937 |
};
|
938 |
|
939 |
SGPBBackend.prototype.backgroundRangeSliderInit = function()
|
public/js/PopupBuilder.js
CHANGED
@@ -325,7 +325,7 @@ SGPBPopup.prototype.checkCurrentPopupType = function()
|
|
325 |
return allowToOpen;
|
326 |
}
|
327 |
|
328 |
-
var popupHasLimit = this.
|
329 |
if (!popupHasLimit) {
|
330 |
return false;
|
331 |
}
|
@@ -349,12 +349,6 @@ SGPBPopup.prototype.checkCurrentPopupType = function()
|
|
349 |
}
|
350 |
}
|
351 |
|
352 |
-
if (typeof this.allowAfterXPages != 'undefined') {
|
353 |
-
var allowAfterXPages = this.allowAfterXPages();
|
354 |
-
if (!allowAfterXPages) {
|
355 |
-
return false;
|
356 |
-
}
|
357 |
-
}
|
358 |
/* make the first letter of a string uppercase, then concat prefix (uppercase all prefix string) */
|
359 |
className = popupConfig.prefix.toUpperCase() + className.firstToUpperCase();
|
360 |
/* hasOwnProperty returns boolean value */
|
@@ -400,26 +394,135 @@ SGPBPopup.prototype.isAllowJsConditions = function() {
|
|
400 |
return isAllow;
|
401 |
};
|
402 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
403 |
SGPBPopup.prototype.popupLimitation = function(popupData)
|
404 |
{
|
405 |
var currentUrl = window.location.href;
|
406 |
var currentPopupId = popupData['sgpb-post-id'];
|
|
|
|
|
407 |
var popupLimitationCookieHomePageLevelName = 'SGPBShowingLimitationHomePage' + currentPopupId;
|
408 |
var popupLimitationCookiePageLevelName = 'SGPBShowingLimitationPage' + currentPopupId;
|
409 |
var popupLimitationCookieDomainName = 'SGPBShowingLimitationDomain' + currentPopupId;
|
|
|
|
|
410 |
var popupLimitation = popupData['sgpb-show-popup-same-user'];
|
|
|
411 |
if (typeof popupLimitation != 'undefined' && popupLimitation) {
|
412 |
var popupShowingLimit = popupData['sgpb-show-popup-same-user-count'];
|
413 |
var popupShowingLimitExpiry = popupData['sgpb-show-popup-same-user-expiry'];
|
414 |
var pageLevelCookie = popupData['sgpb-show-popup-same-user-page-level'];
|
|
|
415 |
if (typeof pageLevelCookie == 'undefined') {
|
416 |
pageLevelCookie = '';
|
417 |
}
|
|
|
|
|
418 |
if (currentUrl == SGPB_POPUP_PARAMS.homePageUrl) {
|
419 |
popupLimitationCookiePageLevelName = popupLimitationCookieHomePageLevelName;
|
420 |
}
|
|
|
421 |
var popupLimitationPageLevelCookie = SGPopup.getCookie(popupLimitationCookiePageLevelName);
|
422 |
var popupLimitationDomainCookie = SGPopup.getCookie(popupLimitationCookieDomainName);
|
|
|
423 |
/* page level cookie saving selected */
|
424 |
if (pageLevelCookie) {
|
425 |
/* if has already another saving level cookie */
|
@@ -436,6 +539,7 @@ SGPBPopup.prototype.popupLimitation = function(popupData)
|
|
436 |
if (popupShowingLimit <= popupLimitationPageLevelCookie.openingCount) {
|
437 |
return false;
|
438 |
}
|
|
|
439 |
var updatedCount = parseInt(popupLimitationPageLevelCookie.openingCount + 1);
|
440 |
popupLimitationPageLevelCookie.openingCount = updatedCount;
|
441 |
SGPBPopup.setCookie(popupLimitationCookiePageLevelName, JSON.stringify(popupLimitationPageLevelCookie), popupShowingLimitExpiry, currentUrl);
|
@@ -910,6 +1014,10 @@ SGPBPopup.prototype.popupTriggeringListeners = function()
|
|
910 |
var args = e.detail;
|
911 |
that.formSubmissionDetection(args);
|
912 |
var popupOptions = args.popupData;
|
|
|
|
|
|
|
|
|
913 |
/* if no analytics extension */
|
914 |
if (typeof SGPB_ANALYTICS_PARAMS == 'undefined') {
|
915 |
if (that.getCountPopupOpen()) {
|
325 |
return allowToOpen;
|
326 |
}
|
327 |
|
328 |
+
var popupHasLimit = this.isSatistfyForShowingLimitation(this.popupData);
|
329 |
if (!popupHasLimit) {
|
330 |
return false;
|
331 |
}
|
349 |
}
|
350 |
}
|
351 |
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
/* make the first letter of a string uppercase, then concat prefix (uppercase all prefix string) */
|
353 |
className = popupConfig.prefix.toUpperCase() + className.firstToUpperCase();
|
354 |
/* hasOwnProperty returns boolean value */
|
394 |
return isAllow;
|
395 |
};
|
396 |
|
397 |
+
SGPBPopup.prototype.setPopupLimitationCookie = function(popupData)
|
398 |
+
{
|
399 |
+
var cookieData = this.getPopupShowLimitationCookie(popupData);
|
400 |
+
var cookie = cookieData.cookie || {};
|
401 |
+
var openingCount = cookie.openingCount || 0;
|
402 |
+
var currentUrl = window.location.href;
|
403 |
+
|
404 |
+
if (!popupData['sgpb-show-popup-same-user-page-level']) {
|
405 |
+
currentUrl = '';
|
406 |
+
}
|
407 |
+
cookie.openingCount = openingCount + 1;
|
408 |
+
cookie.openingPage = currentUrl;
|
409 |
+
var popupShowingLimitExpiry = popupData['sgpb-show-popup-same-user-expiry'];
|
410 |
+
|
411 |
+
SGPBPopup.setCookie(cookieData.cookieName, JSON.stringify(cookie), popupShowingLimitExpiry, currentUrl);
|
412 |
+
}
|
413 |
+
|
414 |
+
SGPBPopup.prototype.isSatistfyForShowingLimitation = function(popupData)
|
415 |
+
{
|
416 |
+
/*enable||disable*/
|
417 |
+
var popupLimitation = popupData['sgpb-show-popup-same-user'];
|
418 |
+
|
419 |
+
/*if this option unchecked popup must be show*/
|
420 |
+
if (!popupLimitation) {
|
421 |
+
return true;
|
422 |
+
}
|
423 |
+
var cookieData = this.getPopupShowLimitationCookie(popupData);
|
424 |
+
|
425 |
+
/*when there is noot*/
|
426 |
+
if (!cookieData.cookie) {
|
427 |
+
return true;
|
428 |
+
}
|
429 |
+
|
430 |
+
return popupData['sgpb-show-popup-same-user-count'] > cookieData.cookie.openingCount;
|
431 |
+
}
|
432 |
+
|
433 |
+
SGPBPopup.prototype.getPopupShowLimitationCookie = function(popupData)
|
434 |
+
{
|
435 |
+
var savedCookie = this.getPopupShowLimitationCookieDetails(popupData);
|
436 |
+
var savedCookie = this.filterPopupLimitationCookie(savedCookie);
|
437 |
+
|
438 |
+
return savedCookie;
|
439 |
+
}
|
440 |
+
|
441 |
+
SGPBPopup.prototype.filterPopupLimitationCookie = function(cookie)
|
442 |
+
{
|
443 |
+
var result = {};
|
444 |
+
|
445 |
+
if (cookie.isPageLevel) {
|
446 |
+
|
447 |
+
result.cookieName = cookie.pageLevelCookieName;
|
448 |
+
result.cookie = jQuery.parseJSON(cookie.pageLevelCookie);
|
449 |
+
|
450 |
+
SGPBPopup.deleteCookie(cookie.domainLevelCookieName);
|
451 |
+
|
452 |
+
return result;
|
453 |
+
}
|
454 |
+
|
455 |
+
result.cookieName = cookie.domainLevelCookieName;
|
456 |
+
result.cookie = jQuery.parseJSON(cookie.domainLevelCookie);
|
457 |
+
var currentUrl = window.location.href;
|
458 |
+
|
459 |
+
SGPBPopup.deleteCookie(cookie.pageLevelCookieName, currentUrl);
|
460 |
+
|
461 |
+
return result;
|
462 |
+
|
463 |
+
}
|
464 |
+
|
465 |
+
SGPBPopup.prototype.getPopupShowLimitationCookieDetails = function(popupData)
|
466 |
+
{
|
467 |
+
var result = false;
|
468 |
+
var currentUrl = window.location.href;
|
469 |
+
var currentPopupId = popupData['sgpb-post-id'];
|
470 |
+
|
471 |
+
/*Cookie names*/
|
472 |
+
var popupLimitationCookieHomePageLevelName = 'SGPBShowingLimitationHomePage' + currentPopupId;
|
473 |
+
var popupLimitationCookiePageLevelName = 'SGPBShowingLimitationPage' + currentPopupId;
|
474 |
+
var popupLimitationCookieDomainName = 'SGPBShowingLimitationDomain' + currentPopupId;
|
475 |
+
|
476 |
+
var pageLevelCookie = popupData['sgpb-show-popup-same-user-page-level'] || false;
|
477 |
+
|
478 |
+
/*check if current url is home page*/
|
479 |
+
if (currentUrl == SGPB_POPUP_PARAMS.homePageUrl) {
|
480 |
+
popupLimitationCookiePageLevelName = popupLimitationCookieHomePageLevelName;
|
481 |
+
}
|
482 |
+
var popupLimitationPageLevelCookie = SGPopup.getCookie(popupLimitationCookiePageLevelName);
|
483 |
+
var popupLimitationDomainCookie = SGPopup.getCookie(popupLimitationCookieDomainName);
|
484 |
+
|
485 |
+
result = {
|
486 |
+
'pageLevelCookieName': popupLimitationCookiePageLevelName,
|
487 |
+
'domainLevelCookieName': popupLimitationCookieDomainName,
|
488 |
+
'pageLevelCookie': popupLimitationPageLevelCookie,
|
489 |
+
'domainLevelCookie': popupLimitationDomainCookie,
|
490 |
+
'isPageLevel': pageLevelCookie
|
491 |
+
}
|
492 |
+
|
493 |
+
return result;
|
494 |
+
}
|
495 |
+
|
496 |
SGPBPopup.prototype.popupLimitation = function(popupData)
|
497 |
{
|
498 |
var currentUrl = window.location.href;
|
499 |
var currentPopupId = popupData['sgpb-post-id'];
|
500 |
+
|
501 |
+
/*Cookie names*/
|
502 |
var popupLimitationCookieHomePageLevelName = 'SGPBShowingLimitationHomePage' + currentPopupId;
|
503 |
var popupLimitationCookiePageLevelName = 'SGPBShowingLimitationPage' + currentPopupId;
|
504 |
var popupLimitationCookieDomainName = 'SGPBShowingLimitationDomain' + currentPopupId;
|
505 |
+
|
506 |
+
/*enable||disable*/
|
507 |
var popupLimitation = popupData['sgpb-show-popup-same-user'];
|
508 |
+
|
509 |
if (typeof popupLimitation != 'undefined' && popupLimitation) {
|
510 |
var popupShowingLimit = popupData['sgpb-show-popup-same-user-count'];
|
511 |
var popupShowingLimitExpiry = popupData['sgpb-show-popup-same-user-expiry'];
|
512 |
var pageLevelCookie = popupData['sgpb-show-popup-same-user-page-level'];
|
513 |
+
|
514 |
if (typeof pageLevelCookie == 'undefined') {
|
515 |
pageLevelCookie = '';
|
516 |
}
|
517 |
+
|
518 |
+
/*check if current url is home page*/
|
519 |
if (currentUrl == SGPB_POPUP_PARAMS.homePageUrl) {
|
520 |
popupLimitationCookiePageLevelName = popupLimitationCookieHomePageLevelName;
|
521 |
}
|
522 |
+
|
523 |
var popupLimitationPageLevelCookie = SGPopup.getCookie(popupLimitationCookiePageLevelName);
|
524 |
var popupLimitationDomainCookie = SGPopup.getCookie(popupLimitationCookieDomainName);
|
525 |
+
|
526 |
/* page level cookie saving selected */
|
527 |
if (pageLevelCookie) {
|
528 |
/* if has already another saving level cookie */
|
539 |
if (popupShowingLimit <= popupLimitationPageLevelCookie.openingCount) {
|
540 |
return false;
|
541 |
}
|
542 |
+
|
543 |
var updatedCount = parseInt(popupLimitationPageLevelCookie.openingCount + 1);
|
544 |
popupLimitationPageLevelCookie.openingCount = updatedCount;
|
545 |
SGPBPopup.setCookie(popupLimitationCookiePageLevelName, JSON.stringify(popupLimitationPageLevelCookie), popupShowingLimitExpiry, currentUrl);
|
1014 |
var args = e.detail;
|
1015 |
that.formSubmissionDetection(args);
|
1016 |
var popupOptions = args.popupData;
|
1017 |
+
|
1018 |
+
if (popupOptions['sgpb-show-popup-same-user']) {
|
1019 |
+
that.setPopupLimitationCookie(popupOptions);
|
1020 |
+
}
|
1021 |
/* if no analytics extension */
|
1022 |
if (typeof SGPB_ANALYTICS_PARAMS == 'undefined') {
|
1023 |
if (that.getCountPopupOpen()) {
|
public/views/emailTemplates/takeReviewAfterSubscribe.html
ADDED
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2 |
+
<html>
|
3 |
+
|
4 |
+
<head>
|
5 |
+
<meta charset="UTF-8">
|
6 |
+
<meta content="width=device-width, initial-scale=1" name="viewport">
|
7 |
+
<meta name="x-apple-disable-message-reformatting">
|
8 |
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
9 |
+
<meta content="telephone=no" name="format-detection">
|
10 |
+
<title></title>
|
11 |
+
<!--[if (mso 16)]>
|
12 |
+
<style type="text/css">
|
13 |
+
a {text-decoration: none;}
|
14 |
+
</style>
|
15 |
+
<![endif]-->
|
16 |
+
<!--[if gte mso 9]><style>sup { font-size: 100% !important; }</style><![endif]-->
|
17 |
+
</head>
|
18 |
+
|
19 |
+
<body>
|
20 |
+
<div class="es-wrapper-color">
|
21 |
+
<!--[if gte mso 9]>
|
22 |
+
<v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t">
|
23 |
+
<v:fill type="tile" color="#f6f6f6"></v:fill>
|
24 |
+
</v:background>
|
25 |
+
<![endif]-->
|
26 |
+
<table cellpadding="0" cellspacing="0" class="es-wrapper" width="100%">
|
27 |
+
<tbody>
|
28 |
+
<tr>
|
29 |
+
<td valign="top" class="esd-email-paddings">
|
30 |
+
<table cellpadding="0" cellspacing="0" class="es-header esd-header-popover" align="center">
|
31 |
+
<tbody>
|
32 |
+
<tr>
|
33 |
+
<td class="esd-stripe" align="center">
|
34 |
+
<table class="es-header-body" align="center" cellpadding="0" cellspacing="0" width="600">
|
35 |
+
<tbody>
|
36 |
+
<tr>
|
37 |
+
<td class="esd-structure" align="left">
|
38 |
+
<table cellpadding="0" cellspacing="0" width="100%">
|
39 |
+
<tbody>
|
40 |
+
<tr>
|
41 |
+
<td width="600" class="esd-container-frame" align="center" valign="top">
|
42 |
+
<table cellpadding="0" cellspacing="0" width="100%" bgcolor="#292b42" style="background-color: rgb(41, 43, 66);">
|
43 |
+
<tbody>
|
44 |
+
<tr>
|
45 |
+
<td align="center" class="esd-block-image es-p20t es-p20b">
|
46 |
+
<a href="http://stripo.email" target="_blank"><img src="https://hurlv.stripocdn.email/content/guids/CABINET_fbfede4aca6bb86810c4903e5eaf299f/images/14451542005669013.png" alt="" width="389" style="display: block;padding: 20px;"> </a>
|
47 |
+
</td>
|
48 |
+
</tr>
|
49 |
+
</tbody>
|
50 |
+
</table>
|
51 |
+
</td>
|
52 |
+
</tr>
|
53 |
+
</tbody>
|
54 |
+
</table>
|
55 |
+
</td>
|
56 |
+
</tr>
|
57 |
+
</tbody>
|
58 |
+
</table>
|
59 |
+
</td>
|
60 |
+
</tr>
|
61 |
+
</tbody>
|
62 |
+
</table>
|
63 |
+
<table cellpadding="0" cellspacing="0" class="es-content" align="center">
|
64 |
+
<tbody>
|
65 |
+
<tr>
|
66 |
+
<td class="esd-stripe" align="center">
|
67 |
+
<table bgcolor="#ffffff" class="es-content-body" align="center" cellpadding="0" cellspacing="0" width="600">
|
68 |
+
<tbody>
|
69 |
+
<tr>
|
70 |
+
<td class="esd-structure es-p20" align="left">
|
71 |
+
<table cellpadding="0" cellspacing="0" width="100%">
|
72 |
+
<tbody>
|
73 |
+
<tr>
|
74 |
+
<td width="560" class="esd-container-frame" align="center" valign="top">
|
75 |
+
<table cellpadding="0" cellspacing="0" width="100%">
|
76 |
+
<tbody>
|
77 |
+
<tr>
|
78 |
+
<td align="left" class="esd-block-text es-p15b">
|
79 |
+
<h2>Hi [adminUserName]</h2>
|
80 |
+
</td>
|
81 |
+
</tr>
|
82 |
+
<tr>
|
83 |
+
<td align="left" class="esd-block-text">
|
84 |
+
<p>Congrats! You have your first subscriber with Popup Builder!</p>
|
85 |
+
<p>We'll be very thankful if you take a moment to leave a good review for us!</p>
|
86 |
+
<p>Reviews are the main way for the new users to find and try Popup Builder, which allows us to keep making the plugin better and better for existing users like you!</p>
|
87 |
+
<p>Here's the link, please:<br></p>
|
88 |
+
<p><a target="_blank" href="https://wordpress.org/support/plugin/popup-builder/reviews/">https://wordpress.org/support/plugin/popup-builder/reviews/ </a> <br></p>
|
89 |
+
<p>P.S. Get our <a target="_blank" href="https://popup-builder.com/downloads/subscription-plus-popup/"><b>Subscription Plus</b></a> extension to not miss the new subscribers!<br></p>
|
90 |
+
</td>
|
91 |
+
</tr>
|
92 |
+
</tbody>
|
93 |
+
</table>
|
94 |
+
</td>
|
95 |
+
</tr>
|
96 |
+
</tbody>
|
97 |
+
</table>
|
98 |
+
</td>
|
99 |
+
</tr>
|
100 |
+
</tbody>
|
101 |
+
</table>
|
102 |
+
</td>
|
103 |
+
</tr>
|
104 |
+
</tbody>
|
105 |
+
</table>
|
106 |
+
<table cellpadding="0" cellspacing="0" class="es-content" align="center">
|
107 |
+
<tbody>
|
108 |
+
<tr>
|
109 |
+
<td class="esd-stripe" align="center">
|
110 |
+
<table class="es-content-body" align="center" cellpadding="0" cellspacing="0" width="600">
|
111 |
+
<tbody>
|
112 |
+
<tr>
|
113 |
+
<td class="esd-structure" align="left">
|
114 |
+
<table cellpadding="0" cellspacing="0" width="100%">
|
115 |
+
<tbody>
|
116 |
+
<tr>
|
117 |
+
<td width="600" class="esd-container-frame" align="center" valign="top">
|
118 |
+
<table cellpadding="0" cellspacing="0" width="100%">
|
119 |
+
<tbody>
|
120 |
+
<tr>
|
121 |
+
<td align="center" class="esd-block-spacer" height="15"> </td>
|
122 |
+
</tr>
|
123 |
+
</tbody>
|
124 |
+
</table>
|
125 |
+
</td>
|
126 |
+
</tr>
|
127 |
+
</tbody>
|
128 |
+
</table>
|
129 |
+
</td>
|
130 |
+
</tr>
|
131 |
+
</tbody>
|
132 |
+
</table>
|
133 |
+
</td>
|
134 |
+
</tr>
|
135 |
+
</tbody>
|
136 |
+
</table>
|
137 |
+
<table cellpadding="0" cellspacing="0" class="es-content" align="center">
|
138 |
+
<tbody>
|
139 |
+
<tr>
|
140 |
+
<td class="esd-stripe" align="center">
|
141 |
+
<table class="es-content-body" align="center" cellpadding="0" cellspacing="0" width="600">
|
142 |
+
<tbody>
|
143 |
+
<tr>
|
144 |
+
<td class="esd-structure" align="left">
|
145 |
+
<table cellpadding="0" cellspacing="0" width="100%">
|
146 |
+
<tbody>
|
147 |
+
<tr>
|
148 |
+
<td width="600" class="esd-container-frame" align="center" valign="top">
|
149 |
+
<table cellpadding="0" cellspacing="0" width="100%">
|
150 |
+
<tbody>
|
151 |
+
<tr>
|
152 |
+
<td align="center" class="esd-empty-container" style="display: none;"></td>
|
153 |
+
</tr>
|
154 |
+
</tbody>
|
155 |
+
</table>
|
156 |
+
</td>
|
157 |
+
</tr>
|
158 |
+
</tbody>
|
159 |
+
</table>
|
160 |
+
</td>
|
161 |
+
</tr>
|
162 |
+
</tbody>
|
163 |
+
</table>
|
164 |
+
</td>
|
165 |
+
</tr>
|
166 |
+
</tbody>
|
167 |
+
</table>
|
168 |
+
<table cellpadding="0" cellspacing="0" class="es-content esd-footer-popover" align="center">
|
169 |
+
<tbody>
|
170 |
+
<tr>
|
171 |
+
<td class="esd-stripe" align="center">
|
172 |
+
<table class="es-content-body" align="center" cellpadding="0" cellspacing="0" width="600">
|
173 |
+
<tbody>
|
174 |
+
<tr>
|
175 |
+
<td class="esd-structure" align="left">
|
176 |
+
<table cellpadding="0" cellspacing="0" width="100%">
|
177 |
+
<tbody>
|
178 |
+
<tr>
|
179 |
+
<td width="600" class="esd-container-frame" align="center" valign="top">
|
180 |
+
<table cellpadding="0" cellspacing="0" width="100%">
|
181 |
+
<tbody>
|
182 |
+
<tr>
|
183 |
+
<td align="center" class="esd-empty-container" style="display: none;"></td>
|
184 |
+
</tr>
|
185 |
+
</tbody>
|
186 |
+
</table>
|
187 |
+
</td>
|
188 |
+
</tr>
|
189 |
+
</tbody>
|
190 |
+
</table>
|
191 |
+
</td>
|
192 |
+
</tr>
|
193 |
+
</tbody>
|
194 |
+
</table>
|
195 |
+
</td>
|
196 |
+
</tr>
|
197 |
+
</tbody>
|
198 |
+
</table>
|
199 |
+
</td>
|
200 |
+
</tr>
|
201 |
+
</tbody>
|
202 |
+
</table>
|
203 |
+
</div>
|
204 |
+
</body>
|
205 |
+
|
206 |
+
</html>
|
public/views/mainRateUsBanner.php
CHANGED
@@ -1,31 +1,30 @@
|
|
1 |
<?php
|
|
|
2 |
$upgradeLink = SG_POPUP_RATE_US_URL;
|
3 |
$buttonText = 'RATE US';
|
4 |
if (SGPB_POPUP_PKG == SGPB_POPUP_PKG_FREE) {
|
5 |
$upgradeLink = SG_POPUP_ALL_EXTENSIONS_URL;
|
6 |
$buttonText = 'MORE EXTENSIONS';
|
7 |
}
|
|
|
8 |
?>
|
9 |
<div class="sgpb-wrapper sgpb-banner-wrapper">
|
10 |
<div class="row">
|
11 |
<div class="col-xs-12">
|
12 |
<div class="sgpb-main-rate-us-banner-wrapper">
|
13 |
<div class="row">
|
14 |
-
<div class="col-xs-
|
15 |
<div class="row">
|
16 |
-
<div class="col-xs-
|
17 |
-
<div class="col-xs-
|
18 |
<a href="<?php echo SG_POPUP_ALL_EXTENSIONS_URL ;?>" target="_blank" class="sgpb-banner-logo-link"><div class="sgpb-banner-logo"></div></a>
|
19 |
</div>
|
20 |
</div>
|
21 |
</div>
|
22 |
-
<div class="col-xs-
|
23 |
<div class="row">
|
24 |
<div class="col-xs-12">
|
25 |
-
|
26 |
-
<img src="<?php echo SG_POPUP_IMG_URL;?>star.png" width="40px">
|
27 |
-
<span style="vertical-align: sub;"><?php _e($buttonText, SG_POPUP_TEXT_DOMAIN); ?></span>
|
28 |
-
</a>
|
29 |
</div>
|
30 |
</div>
|
31 |
</div>
|
1 |
<?php
|
2 |
+
use sgpb\AdminHelper;
|
3 |
$upgradeLink = SG_POPUP_RATE_US_URL;
|
4 |
$buttonText = 'RATE US';
|
5 |
if (SGPB_POPUP_PKG == SGPB_POPUP_PKG_FREE) {
|
6 |
$upgradeLink = SG_POPUP_ALL_EXTENSIONS_URL;
|
7 |
$buttonText = 'MORE EXTENSIONS';
|
8 |
}
|
9 |
+
$banner = AdminHelper::getBannerText();
|
10 |
?>
|
11 |
<div class="sgpb-wrapper sgpb-banner-wrapper">
|
12 |
<div class="row">
|
13 |
<div class="col-xs-12">
|
14 |
<div class="sgpb-main-rate-us-banner-wrapper">
|
15 |
<div class="row">
|
16 |
+
<div class="col-xs-3 sgpb-rate-us-banner-1">
|
17 |
<div class="row">
|
18 |
+
<div class="col-xs-1"></div>
|
19 |
+
<div class="col-xs-9">
|
20 |
<a href="<?php echo SG_POPUP_ALL_EXTENSIONS_URL ;?>" target="_blank" class="sgpb-banner-logo-link"><div class="sgpb-banner-logo"></div></a>
|
21 |
</div>
|
22 |
</div>
|
23 |
</div>
|
24 |
+
<div class="col-xs-6 sgpb-rate-us-banner-2">
|
25 |
<div class="row">
|
26 |
<div class="col-xs-12">
|
27 |
+
<?php echo $banner; ?>
|
|
|
|
|
|
|
28 |
</div>
|
29 |
</div>
|
30 |
</div>
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ Tags: popup, pop up, wordpress popup, popup maker, exit popup, popup builder, wo
|
|
7 |
Requires at least: 3.8
|
8 |
Tested up to: 5.0
|
9 |
Requires PHP: 5.3.3
|
10 |
-
Stable tag: 3.1
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
@@ -78,6 +78,10 @@ With Popup Builder plugin you can insert any type of content, right into your Po
|
|
78 |
|
79 |
* Recent sales or Social proof - promote more sales showing all your live sales popups to notify your customers about recently bought items.
|
80 |
|
|
|
|
|
|
|
|
|
81 |
* Iframe popup - you can set the URL you want to load within an iframe and the popup will load that iframe.
|
82 |
|
83 |
* Video popup - embed YouTube and Vimeo videos inside your popup.
|
@@ -174,6 +178,13 @@ Go to the Popup Builder settings and set your desired options.
|
|
174 |
|
175 |
== Changelog ==
|
176 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
= Version 3.1 =
|
178 |
* Bug fixed related to cookie saving for Safari and Internet Explorer.
|
179 |
* Add new option to show categories for WooCommerce product(s).
|
7 |
Requires at least: 3.8
|
8 |
Tested up to: 5.0
|
9 |
Requires PHP: 5.3.3
|
10 |
+
Stable tag: 3.1.1
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
78 |
|
79 |
* Recent sales or Social proof - promote more sales showing all your live sales popups to notify your customers about recently bought items.
|
80 |
|
81 |
+
* Login popup - open login form inside the popup.
|
82 |
+
|
83 |
+
* Registration popup - open registration form inside the popup.
|
84 |
+
|
85 |
* Iframe popup - you can set the URL you want to load within an iframe and the popup will load that iframe.
|
86 |
|
87 |
* Video popup - embed YouTube and Vimeo videos inside your popup.
|
178 |
|
179 |
== Changelog ==
|
180 |
|
181 |
+
= Version 3.1.1 =
|
182 |
+
* Now the popup limitation cookie is saving only after the popup appears.
|
183 |
+
* Popup Builder migration tweak.
|
184 |
+
* Added popup import/export functionality.
|
185 |
+
* Added new extension.
|
186 |
+
* Code improvements and minor bug fixes.
|
187 |
+
|
188 |
= Version 3.1 =
|
189 |
* Bug fixed related to cookie saving for Safari and Internet Explorer.
|
190 |
* Add new option to show categories for WooCommerce product(s).
|